[mod_python] Session Cleanups - Still a mystery

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Jun 3 21:35:32 EDT 2004


Session cleanups should happen randomly with about 1 in 1000 chance (1 out
of 1000 session requests will trigger a cleanup). During a cleanup, all
expired sessions should get deleted from the dmb.

How big is the dmb getting that you are concerned with space?

Grisha

On Thu, 3 Jun 2004, Krishna Srinivasan wrote:

>
> Greetings.
>
> 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 :
> http://modpython.org/pipermail/mod_python/2004-May/015706.html
>
> 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 :
> req.sess.delete()
>
> 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.
>
> Thanks,
> Krishna.
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list