Moodle won't login for 100 student at once

Moodle won't login for 100 student at once

by Miki Alliel -
Number of replies: 5
Picture of Translators

We have  Moodle 3.7 (frodson theme) +mysql(mariadb) , Centos 7 VM with  8 virtual cores and 32GB memory.
About 100 students were trying to login simultaneously but couldn't (Moodle was very slow and didn't respond) . We saw that all cores were on 100% occupation (with htop command) and we had only 6GB memory use.
eventually we had to restart nginx .

Is someone can help us and understand why it happens? and how can I prevent this problem for next time?

Dose our hardware information suites to Moodle requirements?

We noticed that mysql procceses were mostly used, is there any way to add my  mysql more resources , and how?

Any help will be appreciated

Average of ratings: -
In reply to Miki Alliel

Re: Moodle won't login for 100 student at once

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
What is your authentication mechanism: Moodle internal, AD/LDAP or anything else?

Does this happen, only when 100 try to login at the same time, can the same number work later?
In reply to Visvanath Ratnaweera

Re: Moodle won't login for 100 student at once

by Miki Alliel -
Picture of Translators
Yes, we have internal Auth. something that worked always fine with previuse moodle versions and works fine now.
I'm not sure this is the problem.

yes, as I wrote. after I restarted the nginx after 5-7 minutes they could loging fine. and I also cleened the swap .
how can I ensure it won't happen next time?
I can't check 100 fake logins only real students.
In reply to Miki Alliel

Re: Moodle won't login for 100 student at once

by Miki Alliel -
Picture of Translators
Edit:
We work with sql DB auth.
and I don't know how to check 100 fake users on real time (before I have another real exam with student)
In reply to Miki Alliel

Re: Moodle won't login for 100 student at once

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Your authentication method is not clear to me: Is it https://docs.moodle.org/en/Manual_accounts or https://docs.moodle.org/en/Email-based_self-registration or https://docs.moodle.org/en/External_database_authentication or something else?

You mentioned SQL. Where and what is that database?

Did you go through the forum documentation https://docs.moodle.org/en/Performance ?
In reply to Visvanath Ratnaweera

Re: Moodle won't login for 100 student at once

by Miki Alliel -
Picture of Translators
it's sql internal auth from third party. I don't think it's the problem.
I tested my moodle with loadimpact.com site with 50 users simultaneously and all my cores in my server are occupied with about 70% each and my memory is only 3GB in use from 34GB.
Is it normal that Moodle is not using my Memory (hardly use it) but the cpu virtual cores , when mass of users trying to reach my site?