Thoth icon indicating copy to clipboard operation
Thoth copied to clipboard

Session: memory leak in storing to the back end

Open mauritslamers opened this issue 12 years ago • 0 comments

Because of a design error, records of sessions that have been expired can be left behind in the store used for storing the session data. This data accumulates over time and will take more and more memory.

Because the session module uses the diskstore by default, these records that stay behind and are not reachable by the session cleaning mechanism, will remain in memory, possibly causing a crash because Thoth runs out of memory.

This issue is going to be solved by storing the session data in such a way that the session module will actively request the session data from the store. In the current implementation that is not possible, as the username is the bucket/table/document and the key is the session key. The new implementation will use 'session' as bucket/table/document and the [username]_[sessionKey] as key.

Of course this will break sessions still in existence when Thoth is restarted. so please remove the session data file before restarting Thoth.

mauritslamers avatar Mar 25 '12 08:03 mauritslamers