Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] How Jetty Loads On-disk Session Files into Memory

Hi team,

We're using the session-store-file module to persist all sessions on disk. Recently we added a polling service to issue a request every second to the server. Since we deliberately set a very long time-out, it now leaves tons of session files and never gets purged. We were thinking of limiting the total number of sessions under the same user. Thus we created a <user name, session ID> map to track that. However, this would not work throughout the server restart.

Thus, I'm wondering if you could help with the following questions.
1. Will Jetty load all persisted sessions into memory during start-up, or is it a on-demand fashion?
2. If the answer to Q1 is "yes", is there a function that we can piggy-back into?
3. If the answer to Q1 is "no", is there a way to forcibly load in all persisted sessions?

Btw, we're still on the Jetty 9 branch. We're aware of the upcoming EOL and have planned an upgrade :)

Many thanks in advance!

Best,
Yicheng 

Back to the top