- Posts: 4
- Thank you received: 0
- English support forums
- Installation & update issues
- Sessions Timeout immediately - forcing server reboot
Sessions Timeout immediately - forcing server reboot
Users are unable to start a survey, and instead are presented with the error saying their session expired.
However, if I reboot the server, it will work fine for awhile - depending on the nuber of users taking the survey.
The sessions are set to store in files in the /tmp folder.
session.auto_start is set off
session.gc_maxlifetime is set to 1440
The complete list.
session.cookie_domain no value
session.referer_check no value
I don't believe this is a LimeSurvey issue in and of itself, but some sort of server setting, but can't find anything dealing with this particular issue. I'm running php 5.6.31, though this has occurred on 5.5
And insight or thoughts would be greatly appreciated.
- Posts: 9019
- Karma: 400
- Thank you received: 1499
But sometimes it's better to set session.gc_probability to 0 and use a cron job for the garbage.
Check the free space for every partition. Is there enough space? Or is the tmp folder on a tmpfs ramdisk, which is running out of space till you restart the server.
RLaRock wrote: However, if I reboot the server, it will work fine for awhile - depending on the nuber of users taking the survey.The sessions are set to store in files in the /tmp folder.
Create a folder for phpsessionfiles (e.g. /tmpphp) and don't use the /tmp for sessions.
Perhaps other applications are deleting files in the /tmp folder.
What OS/Distribution is used?
The session issue occurred again today, and I took the first suggestion of switching to database sessions instead of file based session storage.
That seems to have worked.
What I did notice in doing so is that the active sessions are rather large - averaging around 2.2 Mb each, which I hadn't realized. So Jelo's question about the /tmp folder running over its allocated size seems most likely. The issue always seems to occur around the same session number - between 80-90.
Rebooting deleted all the sessions in /tmp, so it would have corrected the storage issue.
At this point I will stay with the database storage for the duration of this current active survey and then look at setting up a separate folder.
Thanks, for the help!
The sessionfilesize is quite insane. 1-2 MB from the start. So when you got rush time the sessions are occupying large amounts of space. The typical setups with restricted tmp folder and php file sessions pointing to /tmp are not suitable for LimeSurvey. So you're not alone. On a single instance with SSD I/O I consider filebased sessions files quite suitable.
RLaRock wrote: What I did notice in doing so is that the active sessions are rather large - averaging around 2.2 Mb each, which I hadn't realized.
Someone did a few tests with Magneto and PHP-sessionhandler.