[mod_python] Session expires early

Graham Dumpleton grahamd at dscpl.com.au
Sun Jan 8 05:34:19 EST 2006


On 07/01/2006, at 1:51 PM, Sean Jamieson wrote:

> Does anyone know why, or has anyone else notices, that a session seems 
> to time out reguardless of when it was last accessed?
> i.e. I'm browsing along for 20-30 minutes, and then the I click a link 
> after being idle less than 5 minutes, and suddenly my session is 
> expired.
>
> This even happend today when I was showing something to a client, on 
> my laptop.

AFAIK, the person who best understands the session code is not checking
email at the moment. At least, haven't seen anything from them for a
while.

First question from me. What version of mod_python are you using? If not
using version 3.2.5b, can you at least upgrade and confirm whether you
see the same problem in that version.

Also and more importantly, in the page access' between when you log in
and when it expires, is your code ever actually saving the session 
object
for any reason?

I can't remember if a save is a prerequisite for having the last 
accessed
time updated in the session database. Ie., if you don't do a save, that
you accessed the session is never recorded and so it will expire as soon
as the timeout value elapses.

Surely not everyone who understands session is still on holidays! :-)

Graham



More information about the Mod_python mailing list