[mod_python] session locking causes hang with mpservlets

Nick nick at dd.revealed.net
Mon Mar 28 09:49:15 EST 2005

Daniel Popowich wrote:
>>>The problem is that even though one sets self.session to None,
>>>this doesn't mean it will be deleted immediately as one is in part
>>>at the mercy of the Python garbage collector.
> Thanks for digging into this Graham.  Yes, I thought this would be
> sufficient:
>             self.session.save()
>             self.session = None
> as the garbage collector would clean up the session.

I have noticed that even calls explicitly to gc.collect() don't necessarily 
do the job, either... so in general, if you've got an object with an 
explicit __del__ method, it's best to del it explicitly.


More information about the Mod_python mailing list