Welcome to the LimeSurvey Community Forum

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

Session loss and logout issues when running LimeSurvey on multiple pods kubernet

More
1 day 13 hours ago #272782 by ryderhs
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.x
Own server or LimeSurvey hosting:
Survey theme/template:
==================Hello everyone,We’re currently running LimeSurvey in a Kubernetes environment with multiple pods (horizontal scaling). Everything works fine when only one pod is active, but when multiple pods are running simultaneously, users are frequently logged out or encounter session-related errors such as “Invalid session key” or “Session expired”.It seems that LimeSurvey’s default file-based PHP session handling causes each pod to have its own isolated session storage, so users switching between pods lose their session.We need to run multiple pods to handle load testing and high-traffic scenarios, so disabling multi-pod setup isn’t an option for us.Could you please advise on the best practice or configuration for handling sessions in a multi-pod setup?
Specifically:
  • Is it possible to configure LimeSurvey to use Redis or Memcached for session storage?
  • Are there any recommended parameters or examples for
    Code:
    config.php
    or
    Code:
    security.php
    to make session handling cluster-safe?
  • Alternatively, is enabling sticky sessions at the ingress/load balancer level an acceptable workaround?
Any guidance, documentation links, or examples from similar setups would be greatly appreciated.Thank you in advance!

Please Log in to join the conversation.

More
10 hours 29 minutes ago - 10 hours 28 minutes ago #272807 by DenisChenu
Hi,

1. You can use DB session, it's done for this ( www.limesurvey.org/manual/Optional_settings/en#Session_settings ) and config.php comment part
2. You can configure your PHP to use www.php.net/manual/en/memcached.sessions.php or Redis cache. LimeSurvey use it transparently.


> Alternatively, is enabling sticky sessions at the ingress/load balancer level an acceptable workaround

Yes, there are some user using such solution.
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 10 hours 28 minutes ago by DenisChenu.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose