[mod_python] Session Cleanups - Still a mystery

Krishna Srinivasan krishna at ironport.com
Thu Jun 3 15:46:20 EDT 2004


Can someone please explain how exactly sessions are cleaned up ?
I am seeing a constant increase in the /tmp/mp_sess.dbm though
I believe I am doing a 'delete' (and cleanup).

I had posted this question some days back, here :

For each session, whenever a user does some action (which internally
involves creating objects and storing them in the session dictionary),
I do a "req.sess.save".
[Where req.sess = Session.Session()]

And then when they do a 'logout' - I do this :

However,  the size of mp_sess.dbm in /tmp is on the rise
always. Can someone please tell me what else I should be doing ?

I store everything in a simple dictionary.
req.sess["mydict"] = <mydictionary>
The 'mydictionary' object keeps expanding based on user-actions.
I even do a 'del' to remove objects from this 'mydictionary'
object to keep the space down.

System - FreeBSD 4.7 - Apache 2.0.48 - Python 2.2.3 - ModPy 3.1.3

Please let me know how to fix this.


More information about the Mod_python mailing list