[mod_python] session variable value (partially) dissapearing

Martijn Moeling martijn at xs4us.nu
Thu Mar 29 07:12:11 EST 2007


Are you properly saving the session at every request?
Like:

# Created session like this:
# req.session = Session.Session(req)

Req.session.save()

Martijn

-----Oorspronkelijk bericht-----
Van: mod_python-bounces at modpython.org
[mailto:mod_python-bounces at modpython.org] Namens Jim Gallacher
Verzonden: Wednesday, March 28, 2007 3:00 AM
Aan: Detmar Meurers
CC: mod_python at modpython.org; Graham Dumpleton
Onderwerp: Re: [mod_python] session variable value (partially)
dissapearing

Detmar Meurers wrote:
> Hi Graham,
> 
> Thanks for the very quick reply.
> 
> The page showing the problem actually is using the publisher handler
> (so no special exception handling etc.)
> 
> I tried the FileSession and the problem occurs there too - and I'm
> not doing any calling of unlock().
> 
> I am calling req.session.save() - one question about that though:
> Can it possibly cause problems when calling the save() several times
> when handling one request?

It shouldn't matter. The session store is locked so only one request can

read or write at a time. This is the case even if you have session 
locking turned off, or unlock the session manually.

Jim
_______________________________________________
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