How to configure LimeSurvey with Load-Balancing?

More
9 months 2 weeks ago - 9 months 2 weeks ago #149030 by whowe1
whowe1 created the topic: How to configure LimeSurvey with Load-Balancing?
I've been a user of LimeSurvey for many years.

Just recently our IT department implemented load balancing on our servers. After they made this change we started experiencing several issues with LimeSurvey. At first, I couldn't even log in as the admin without being immediately logged out until I enabled table-based sessions by adding the block of code (below) to the config file. Once I did that, I was able to stay logged in but the survey sessions are still being deleted/lost as users navigate between sections.

Can someone please explain to me what I need to change in the config to get this working again?

Do sticky sessions need to be enabled?

The code below is what I added to the config. I'm using Postgres.
// Uncomment the following line if you need table-based sessions
         'session' => array (
             'class' => 'application.core.web.DbHttpSession',
             'connectionID' => 'db',
             'sessionTableName' => '{{sessions}}',
         ),	 
		 ),
Last Edit: 9 months 2 weeks ago by whowe1.

Please Log in to join the conversation.

More
9 months 2 weeks ago #149032 by holch
holch replied the topic: How to configure LimeSurvey with Load-Balancing?
Actually, I think your IT department that implemented this should know how to solve this. If not, they should not have implemented something like load balancing. They should be aware that load balancing can impact webapplications and be able to solve those problems. I find it totally irresponsible to implement something like load balancing and not check and test before if this can cause trouble. Load balancing can be quite complicated and also not always has the desired positive effects. Therefore it is always recommendable to setup a test environment, check how things work and then try to solve problems before you implement something like this on a live system.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
9 months 2 weeks ago #149039 by jelo
jelo replied the topic: How to configure LimeSurvey with Load-Balancing?

whowe1 wrote: Once I did that, I was able to stay logged in but the survey sessions are still being deleted/lost as users navigate between sections.

What is meant by users and sections? Are the issues in the backend (users which login and create/changes surveys)? What is with respondents filling out surveys? Any issues there?

To switch the sessions from file to database won't enable you do get LimeSurvey working with Loadbalancer. The best short term approach for you is to ask for activating sticky sessions on the loadbalancer. That will ensure user session consistency.

@holch: Did we ever had a LimeSurvey 2.5+ (2.6X.Y) user with a working loadbalancing setup here in the forum? Some users might get the impression that the professional LimeSurvey hosting (aka LimeSurvey Professional (previously LimeService)) is using a cluster. And then concluding that LimeSurvey is prepared to cope with multiserver setups out of the box. As far as I know former LimeSurvey Professional (previously LimeService) isn't running a cluster but single dedicated servers.

Please Log in to join the conversation.

More
9 months 2 weeks ago #149045 by holch
holch replied the topic: How to configure LimeSurvey with Load-Balancing?
I have no idea about load balancing. This is way over my head and I don't think it is necessary as long as you have a powerfull server with good internet connection. At least for 99,9999% of all applications out there. Now if you want to handle a few million concurrent participants, then you should have a good team of developers and an incredible infrastructure anyway, I guess. But hey, I am not a server expert...

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
9 months 2 weeks ago #149046 by holch
holch replied the topic: How to configure LimeSurvey with Load-Balancing?
And even if the LimeSurvey Professional (previously LimeService) hosting would have a real load balancing (no idea), this doesn't mean it would work anywhere. As far as I can see, there have been made a few modifications for the LimeSurvey Professional (previously LimeService) installation anyway (like counting participants/answers, and so own. So I don't know what else is modified from the standard packages.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
9 months 2 weeks ago #149240 by DenisChenu
DenisChenu replied the topic: How to configure LimeSurvey with Load-Balancing?
Hi,

It's $_SESSION issue : 2 solution :
1. move session save path outside loadbalancer,
2. use DB session.

Maybe you have to update too manual.limesurvey.org/Optional_settings#Session_settings cookieParams if the load balancer didn't know what url is from (some set it at localhost for example due to proxy).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
9 months 2 weeks ago #149306 by jelo
jelo replied the topic: How to configure LimeSurvey with Load-Balancing?

DenisChenu wrote: It's $_SESSION issue : 2 solution :
1. move session save path outside loadbalancer,
2. use DB session.

We don't know how the loadbalancing setup is done. Sticky session ensure that session and fileupload will work. It is the best, short term option until the complete loadbalancing concept is known.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!