[OSM-dev] Session Timeout
tom at compton.nu
Thu Jun 14 17:22:28 BST 2007
In message <yekejkeraxw.fsf at dellow.uk.cyberscience.com>
Tom Hughes <tom at compton.nu> wrote:
> In message <541CC253-B4E0-43ED-9FB5-CC60A1FFF45E at gmail.com>
> Shaun McDonald <shaunmcdonald131 at gmail.com> wrote:
>> I'd like to know what the session timeout of www.openstreetmap.org is
>> set to, because I'm fed up with it timing out in about 15 minutes of
>> use. I think something like 5 hours is far more appropriate.
> As far as I can tell (and it is very obtuse) there is no timeout.
I have now found it...
There is a cron job that runs four times an hour and kills any session
that hasn't been modified for at least 15 minutes.
Unfortunately it is mostly only logging in that modifies the session
and simply using the site will not cause the modification time to
change so the session will normally be destroyed within half an hour
of it being started.
I have just changed it to (a) use atime instead of mtime so that just
accessing a page should extend the life and (b) wait two hours instead
of 15 minutes after the last change before removing it.
It may be that this causes problems with the number of sessions - rails
seems to be known for that when using filesystem based sessions so I will
need to keep an eye on it.
Tom Hughes (tom at compton.nu)
More information about the dev