problems with apache with 6000 users

problems with apache with 6000 users

by Eslam Gamie -
Number of replies: 3

Happy new year all,

I am using moodle 2.4 with more than 6000 users and 700 courses for university, I ve just installed moodle 10 months ago and it was running fine till couple of weeks ago when apache started consuming a lot of memory causing the service to be down. am running moodle on ubuntu linux, with a 4 cores processor and 6 GB RAM. I wanted to ask do we need a load balance to overcome this issue? i.e) we only have one server with database on, shall we separate the database to another server and let the application deal with it? or I dont need that?

Actually am not facing a slow system rather than a sudden stop of service when i got 3.68 GB ram out of 6 GB ram reache this limit the website does not open (down), But I am still able to access the server and restart apache then it starts working again.

php version 5.4.6-1

MySQL client version: 5.5.32

Apache/2.2.22 .

am running  moodle normally not common gateway interface and my error log is fine 

you quick response is highly appreciated 

Thank you 

Average of ratings: -
In reply to Eslam Gamie

Re: problems with apache with 6000 users

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So what changed two weeks ago?  And, if nothing, have you checked your RAM?

In reply to Eslam Gamie

Re: problems with apache with 6000 users

by Valery Fremaux -
Picture of Plugin developers

I would suggest you to monitor your system resources using nagios probes and nagios_graph. 

Often density of use increase is not addressed when setting up moodle at first time of exploitation life. 

Check also if service goes down because Apache goes away or if your Mysql server goes down... Often when a system goes out of memory, some processes are discarded to leave system core safe... i had several cases when mysql goes done before other processes, breacking anyway the service. 

Load will not so much come from amount of users, but from amount of concurrent users playing on the site, and multiplied by density of resources that are downloaded by users. 

A big moodle log table can also cause some kind of slow queries sometimes, it should be cleaned or even routed to a physical file drop down engine....

Also check what can happen with crowded courses, f.e : a course with all your users inside. Some processes used in cron could have a big work to do in such cases, moreover if people get really active....

What cache strategy are u using ? 

 

Average of ratings: Useful (1)
In reply to Eslam Gamie

Re: problems with apache with 6000 users

by Ken Task -
Picture of Particularly helpful Moodlers

For something quick, suggest using terminal and viewing 'top'.  It could be, as already suggested, that the DB server on the same server is struggling to keep pace with the 'traffic'.

Also check the config of apache ...

# prefork MPM
# StartServers: number of server processes to start

? running # worker MPM?

As far as a dedicated server for DB, may not be a bad idea.  One can dedicate nearly all the memory of that DB server to nothing but DB, thus, also, allowing increasing apache servers on the web server box, etc..

Could be a combination of factors ... how Moodle being used, config of Apache and/or MySQL.   For a tool to check your DB, try mysqltuner.

No 'quick fix' without investigating the whole system.

'spirit of sharing', Ken

Average of ratings: Useful (1)