[jira] [Commented] (WICKET-7108) Wicket file storage bloating

2024-05-01 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842618#comment-17842618
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7108:
---

IMO you need to consult with the Tomcat documentation and forums.
Tomcat has settings how to treat users' sessions during restart - to preserve 
or to invalidate. 
As I said earlier - if Tomcat does not send a notification about session 
invalidation then Wicket cannot know that the store should be cleaned up.
Please ask in Tomcat's mailing list why your instance does not send these 
notifications.

> Wicket file storage bloating
> 
>
> Key: WICKET-7108
> URL: https://issues.apache.org/jira/browse/WICKET-7108
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0
>Reporter: Viliam Repan
>Priority: Minor
>
> DiskPageStore doesn't cleanup old/invalid session data. AFAIK there are two 
> scenarios when it forgets about content in wicket file store folder:
>  * normal restart of tomcat, index was saved, however all sessions that were 
> invalidated by restart - files for them will never be cleaned up.
>  * tomcat went down, index file was not saved - whole wicket file store now 
> contains files that will never be cleaned up.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WICKET-7108) Wicket file storage bloating

2024-05-01 Thread Viliam Repan (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842612#comment-17842612
 ] 

Viliam Repan commented on WICKET-7108:
--

Hi [~mgrigorov] 

To clarify - normal scenario:
 # user goes to application, login, session is created
 # some pages created/loaded and later are stored via DiskPageStore in file 
that has name as session id
 # user logout (session invalidated)
 # DiskPageStore remove file related to session

This works correctly.

 

However if tomcat is stopped normally and started. Sessions that were valid 
during previous run are now invalid, and files in page store will remain 
indefinitely.

Same if tomcat is killed or dies for some reason - page store didn't write 
index file (DiskPageStoreIndex) therefore during next start of tomcat index 
file will not be loaded and all files in page store are now invisible to page 
store.

 

We're using spring-boot/spring-security with wicket and tomcat 10. We don't 
have HA configuration for sessions, nor custom session store (jdbc, etc).

This happens only on environments that are restarted frequently (not 
production).

 

Hope this clarified the problem a bit. I'll try to figure out why there's no 
notification about sessions being invalidated during tomcat restart. 

> Wicket file storage bloating
> 
>
> Key: WICKET-7108
> URL: https://issues.apache.org/jira/browse/WICKET-7108
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0
>Reporter: Viliam Repan
>Priority: Minor
>
> DiskPageStore doesn't cleanup old/invalid session data. AFAIK there are two 
> scenarios when it forgets about content in wicket file store folder:
>  * normal restart of tomcat, index was saved, however all sessions that were 
> invalidated by restart - files for them will never be cleaned up.
>  * tomcat went down, index file was not saved - whole wicket file store now 
> contains files that will never be cleaned up.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WICKET-7108) Wicket file storage bloating

2024-05-01 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842575#comment-17842575
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7108:
---

If Tomcat does not send us a notification about invalidating http sessions then 
there is no way to know what to delete.
The provided information is not enough to do a deeper investigation...

What does it mean "tomcat went down, index file was not saved" ?
Define "went down"! Is this a normal stop or a kill ?
What is `index file" ? 


> Wicket file storage bloating
> 
>
> Key: WICKET-7108
> URL: https://issues.apache.org/jira/browse/WICKET-7108
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0
>Reporter: Viliam Repan
>Priority: Major
>
> DiskPageStore doesn't cleanup old/invalid session data. AFAIK there are two 
> scenarios when it forgets about content in wicket file store folder:
>  * normal restart of tomcat, index was saved, however all sessions that were 
> invalidated by restart - files for them will never be cleaned up.
>  * tomcat went down, index file was not saved - whole wicket file store now 
> contains files that will never be cleaned up.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)