Welcome to the LimeSurvey Community Forum

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

Limit of sessions

  • steve_81
  • steve_81's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 9 months ago - 7 years 9 months ago #136655 by steve_81
Limit of sessions was created by steve_81
Hi guys,

we have installed limesurvey on a virtual machine at our institute. From time to time we are getting the information, that someone can't access a survey. This happens espacially after a mailing, when more users try to access the survey.

I tried to figure out, where the limitation is and have following information:
- the error message is a bad request: "The CSRF token could not be verified". I can't confirm that, the users don't make a screenshot :-( and I can't make them do so. (additional: We don't use tokens for this survey)
- I raised the max_input_vars of the server to 5000 a long time ago (I read to do so) - further information in the attached phpinfo
- At the time when the access is on maximum only 12 sessions are simultanious open (12 users are about to fill out the survey) this means not, that they clicked on the same time a button (a server request). It seems that a further person can't access the Welcome-Page of a survey. This specific survey has 29 questions in 9 groups and about 130 variables.

General infos:
Version 2.06+ Build 151109
Apache 2.4.7 Ubuntu
MySQL 5.5.49

I have two specific questions:
- Can someone see, where the limitation is? Do you need further information to do so?
- I would like to do a performance test to see how many sessions and requests can be managed. Do you know a tool to do so?

Thanks in advance
Stefan
Attachments:
Last edit: 7 years 9 months ago by steve_81.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #136684 by holch
Replied by holch on topic Limit of sessions
As far as I know, LS 2.06 (and probably 2.5 as well) create fairly big session files for each user, depending on the size of your survey this increases.

I am not a server pro, but from what I heard the solution is more RAM. What is the RAM size that your server has?

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

The topic has been locked.
  • steve_81
  • steve_81's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 9 months ago #136690 by steve_81
Replied by steve_81 on topic Limit of sessions
Neither am I a server pro.
So I'm not sure if my answer to RAM is correct:

The virtual machine says 1,9 GB total memory with "$ top"
on the other hand phpinfo says memory_limit 128M.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #136864 by DenisChenu
Replied by DenisChenu on topic Limit of sessions
You can update memory_limit in your host. But here : i think you don't have more than 12 worker : each new page opened by an user create a new worker for apache.

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: steve_81
The topic has been locked.
  • steve_81
  • steve_81's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 9 months ago #137097 by steve_81
Replied by steve_81 on topic Limit of sessions
Hi Denis,

thanks for your suggestion.

I tried to find out where to find this worker-thing and found this link:
designmeetscode.de/apache-konfigurieren-maxrequestworkers/

The settings on my server were the default ones and I didn't find a limitation at 12 workers. I raised the values a little bit, but I'm not sure if it works.

Do you know a server tool to simulate users/workers?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #137112 by DenisChenu
Replied by DenisChenu on topic Limit of sessions
Maybe some SQL issue too : if you have
100 PHP server opened but SQL access take times : then it don't improve anything ....

Test must be done on server with htop and/or mtop (for mysql).

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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • steve_81
  • steve_81's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 9 months ago #137114 by steve_81
Replied by steve_81 on topic Limit of sessions
Good suggestion that SQL may be the bottleeneck.
Okay, I'll give it a try.
The topic has been locked.
More
7 years 9 months ago #137155 by jelo
Replied by jelo on topic Limit of sessions
[quote="steve_81" post=137097Do you know a server tool to simulate users/workers?[/quote]
A simple one is "ab". Apache benchmark
httpd.apache.org/docs/2.4/programs/ab.html

Be cautions when reading optimizations guides for Apache with MySQL and PHP on the Web.
Check which Apache version was used for the optimization guide. And how PHP and Apache are tied together.
There is mostly no complete right or wrong. And even bad configurations tend to work quite robust.
For Apache 2.4 you might take a look at this guide: wiki.mikejung.biz/Apache

To get a better feeling about the server itself install SAR and collect data to identify the bottlenecks more easily.

A simple way to ease load on the surveyserver is to send out invitations over a 24-48h timeframe and not at once. Professional mailing tools allow exactly to set the rate per second and the amount over a timeframe.

Sessions are often written as file. Limesurvey tend to write a big sessionfile at the start. That can be a big burden on the storage. I have never seen a tool in the PHP space writing such big session files at the beginning of a session. 1 MB or more on quite small surveys.

A simple way to speed up things is to use SSD as storage. When the server memory is slow Linux begins to swap memory onto the storage. With SSD these situations can be a lot snappier than with SATA. You don't want to swap, so adding RAM is always good. Without optimizing MySQL, it won't be used by the database but Linux will make use of it.

Instead of top please install htop and atop. They offer a better picture on what is going on.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
7 years 9 months ago #137156 by jelo
Replied by jelo on topic Limit of sessions
I am only allowed to post two URL Links. The spam prevention setting in the forum are making it easy to not post at all.

SAR
crybit.com/sysstat-sar-on-ubuntu-debian/

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose