[mod_python] mod_python sessions, locking, and PSP

Jim Gallacher jpg at jgassociates.ca
Mon Aug 14 06:47:02 EDT 2006

Graham Dumpleton wrote:
> Jim Gallacher wrote ..
>> Michael Spang wrote:
>>> I recently ran into deadlocks using sessions in both my mod_python
>>> handler and in psp. I've read through the thread at
>>> http://www.modpython.org/pipermail/mod_python/2005-May/018035.html and
>>> understand that this occurs because both my handler and PSP create their
>>> own session instance and attempt to lock the session.
>>> My question is: why doesn't the mod_python sessions module keep a
>>> reference to each constructed session object and the thread that has
>> it
>>> locked? 
>> Easier said than done in mpm-prefork or mpm-worker. It's possible to
>> keep track of the session object within a single request, but difficult
>> (as in nearly impossible) to do it across requests in these 2 mpms.
> Hmmm, what do you mean by across requests here? The only thing I can think of
> that even makes sense doesn't even relate to which MPM is used.

Bit of a brain fart actually. I was thinking of something unrelated.


More information about the Mod_python mailing list