Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Session timeout if more than a couple of people try to fill out a survey

  • DH2706
  • DH2706's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 3 weeks ago - 9 months 3 weeks ago #244815 by DH2706
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.1.4+230620
Own server or LimeSurvey hosting: Own
Survey theme/template: Fruity
==================
Hi,
I have noticed that in my last survey the participants always receive session timeout errors if more than 20-30 people are trying to fill out the survey. I have tried to update my limesurvey instance to the newest version and I also tried creating a new one under a slightly different subdomain. Unfortunately, neither way has worked. Is there anything else I could try?

 CorePHP Version7.3.33-10+0~20230409.104+debian10~1.gbp88ff76DirectiveLocal ValueMaster Valueallow_url_fopenOnOnallow_url_includeOffOffarg_separator.input&&arg_separator.output&&auto_append_fileno valueno valueauto_globals_jitOnOnauto_prepend_fileno valueno valuebrowscapno valueno valuedefault_charsetUTF-8UTF-8default_mimetypetext/htmltext/htmldisable_classesno valueno valuedisable_functionspcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,leak,dl,stream_socket_server,stream_socket_sendtopcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,leak,dl,stream_socket_server,stream_socket_sendtodisplay_errorsOffOffdisplay_startup_errorsOffOffdoc_rootno valueno valuedocref_extno valueno valuedocref_rootno valueno valueenable_dlOffOffenable_post_data_readingOnOnerror_append_stringno valueno valueerror_log/data/web/e10082/log/php_error.log/data/web/e10082/log/php_error.logerror_prepend_stringno valueno valueerror_reporting022527expose_phpOffOffextension_dir/usr/lib/php/20180731/usr/lib/php/20180731file_uploadsOnOnhard_timeout22highlight.comment#FF8000#FF8000highlight.default#0000BB#0000BBhighlight.html#000000#000000highlight.keyword#007700#007700highlight.string#DD0000#DD0000html_errorsOnOnignore_repeated_errorsOffOffignore_repeated_sourceOffOffignore_user_abortOffOffimplicit_flushOffOffinclude_path/data/web/e10082/html/apps/limesurvey-306/vendor/pear/console_getopt:/data/web/e10082/html/apps/limesurvey-306/vendor/pear/ole:/data/web/e10082/html/apps/limesurvey-306/vendor/pear/pear_exception:/data/web/e10082/html/apps/limesurvey-306/vendor/pear/spreadsheet_excel_writer:/data/web/e10082/html/apps/limesurvey-306/vendor/pear/pear-core-minimal/src:..input_encodingno valueno valueinternal_encodingno valueno valuelog_errorsOnOnlog_errors_max_len10241024mail.add_x_headerOnOnmail.force_extra_parametersno valueno valuemail.log/var/log/php73_mail.log/var/log/php73_mail.logmax_execution_time1200300max_file_uploads2020max_input_nesting_level6464max_input_time-1-1max_input_vars50005000max_multipart_body_parts-1-1memory_limit256M256Mopen_basedir/data/web/e10082/html/apps/limesurvey-306:/data/web/e10082/phpsession:/data/web/e10082/phptmp:/tmp:/usr/bin/data/web/e10082/html/apps/limesurvey-306:/data/web/e10082/phpsession:/data/web/e10082/phptmp:/tmp:/usr/binoutput_buffering40964096output_encodingno valueno valueoutput_handlerno valueno valuepost_max_size256M256Mprecision1414realpath_cache_size4096K4096Krealpath_cache_ttl120120register_argc_argvOffOffreport_memleaksOnOnreport_zend_debugOnOnrequest_orderGPGPsendmail_fromno valueno valuesendmail_path/usr/sbin/sendmail -t -i/usr/sbin/sendmail -t -iserialize_precision-1-1short_open_tagOnOnSMTPlocalhostlocalhostsmtp_port2525sys_temp_dir/data/web/e10082/phptmp/data/web/e10082/phptmpsyslog.facilityLOG_USERLOG_USERsyslog.filterno-ctrlno-ctrlsyslog.identphpphptrack_errorsOffOffunserialize_callback_funcno valueno valueupload_max_filesize256M256Mupload_tmp_dir/data/web/e10082/phptmp/data/web/e10082/phptmpuser_dirno valueno valueuser_ini.cache_ttl300300user_ini.filename.user.ini.user.inivariables_orderGPCSGPCSxmlrpc_error_number00xmlrpc_errorsOffOffzend.assertions-1-1zend.detect_unicodeOnOnzend.enable_gcOnOnzend.multibyteOffOffzend.script_encodingno valueno valuezend.signal_checkOffOff sessionSession SupportenabledRegistered save handlersfiles user memcached redis redisclusterRegistered serializer handlersphp_serialize php php_binary igbinary msgpack wddxDirectiveLocal ValueMaster Valuesession.auto_startOffOffsession.cache_expire180180session.cache_limiternocachenocachesession.cookie_domainno valueno valuesession.cookie_httponly1no valuesession.cookie_lifetime00session.cookie_path//session.cookie_samesiteno valueno valuesession.cookie_secure10session.gc_divisor10001000session.gc_maxlifetime14401440session.gc_probability11session.lazy_writeOnOnsession.nameLS-OEIWCAGMSPQMOMRGPHPSESSIDsession.referer_checkno valueno valuesession.save_handlerredisredissession.save_path/data/web/e10082/sockets/redis-session.sock/data/web/e10082/sockets/redis-session.socksession.serialize_handlerphpphpsession.sid_bits_per_character55session.sid_length3232session.upload_progress.cleanupOnOnsession.upload_progress.enabledOnOnsession.upload_progress.freq1%1%session.upload_progress.min_freq11session.upload_progress.namePHP_SESSION_UPLOAD_PROGRESSPHP_SESSION_UPLOAD_PROGRESSsession.upload_progress.prefixupload_progress_upload_progress_session.use_cookies11session.use_only_cookies11session.use_strict_mode11session.use_trans_sid00
Last edit: 9 months 3 weeks ago by DH2706.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 3 weeks ago #244828 by holch
Hmmm, do you really think that anyone will read through this "text salad"? Very, very difficult to read.

My guess would be that it has to do with your server and your hosting configuration. I don't think it will change with a new subdomain (why should it?) or with an update.

Where are the sessions stored? How much space does Limesurvey have to store sessions? Session files in Limesurvey can be quite big, depending on your survey.

Are you running this on a shared hosting environment, a VPS or a dedicated server? What are the specifics of the server?

20-30 concurrent respondents can be heavy for weaker hosting packages.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DH2706

Please Log in to join the conversation.

  • DH2706
  • DH2706's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 2 weeks ago #244967 by DH2706
Hi, thank you very much for your response and sorry for that wall of text. I formatted it nicely in the preview but I don't know why it did not keep the tables. Anyway, I messaged my hosting provider and it looks like it was indeed a bad configuration of my hosting package!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 2 weeks ago #244968 by holch
Yeah, shared hosting is usually not ideal for hosting Limesurvey if you have some traffic. And 20-30 concurrent respondents is not a small survey. Even if you send out 1000 invitations, 20-30 concurrent respondents is quite a lot in my opinion.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DH2706

Please Log in to join the conversation.

More
9 months 1 week ago #245059 by sangitasharma
Adjust the session timeout setting in your PHP configuration to a longer duration. Locate the session.gc_maxlifetime directive in your php.ini file and set a higher value, such as 3600 (1 hour) or more, depending on your requirements.
The following user(s) said Thank You: DH2706

Please Log in to join the conversation.

More
9 months 1 week ago #245111 by ritapas
Hello sangitasharma,
would you please tell me which are the drawbacks of having a higher value for gc_maxlifetime?

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 1 week ago #245113 by holch
The higher the maximum lifetime of a session file is, the longer it is stored on your server. This means that you need to reserve more space on your server for session files. The longer your survey, the bigger usually the session files. So if you have a lot of people starting your survey, but not ending it, the longer the max lifetime is, the longer the session files stays and occupies space. If you have enough space on the server and have allocated enough of this space for your session files, then a longer max life time isn't really an issue. Now if you have a lot of long surveys (thus big sessions files that stay long on your server) and a lot of respondents at the same time, it can require quite a bit of space allocated to sessions.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: ritapas

Please Log in to join the conversation.

More
9 months 1 week ago #245115 by ritapas

holch post=245113 userid=5154The higher the maximum lifetime of a session file is, the longer it is stored on your server. This means that you need to reserve more space on your server for session files. The longer your survey, the bigger usually the session files. So if you have a lot of people starting your survey, but not ending it, the longer the max lifetime is, the longer the session files stays and occupies space. If you have enough space on the server and have allocated enough of this space for your session files, then a longer max life time isn't really an issue. Now if you have a lot of long surveys (thus big sessions files that stay long on your server) and a lot of respondents at the same time, it can require quite a bit of space allocated to sessions.

Thank you but what happens if the sessions are set to DB? Are there big records that are written and deleted when expired?

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 1 week ago #245118 by DenisChenu

Thank you but what happens if the sessions are set to DB? Are there big records that are written and deleted when expired?
If session is set on DB : session.gc_maxlifetime is not used.

About session in DB : the issue is another request to DB. Sometimes the speed between the database and the server can be slower than reading and writing to disk.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: ritapas

Please Log in to join the conversation.

More
9 months 1 week ago #245120 by ritapas
This puzzles me a lot! If session.gc_maxlifetime is not used, where may I set the maximum timespan if session is in DB?

Please Log in to join the conversation.

More
9 months 1 week ago #245129 by ritapas
sorry, now I see it's in the global settings when you switch to DB. So, what would be the drawback for a longer session time when session is on db?
Thanks a lot

ritapas post=245120 userid=47181This puzzles me a lot! If session.gc_maxlifetime is not used, where may I set the maximum timespan if session is in DB?

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose