Mini-site outage (sessions? lock period?)

Mini-site outage (sessions? lock period?)

by Rebecca O'Connell -
Number of replies: 3
We had a brief disruption in Moodle service yesterday, and we're trying to figure out what could have caused it. Approximately 35 students were taking a 26 page questionnaire with 5-6 audio clips per page, which was disrupted when Moodle stopped responding mid-test. It started responding again on its own 2-3 minutes later. 
 
I'm thinking that it might be related to the lock period and/or session management (as described in this post), but I don't know how to diagnose or troubleshoot this beyond that. Where do I begin?
 
Thank you,
Rebecca
 
Site Stats
Moodle 2.5.1
PHP/5.3.3
MySQL  5.1.71
Apache/2.2.15 (Red Hat)

 

Average of ratings: -
In reply to Rebecca O'Connell

Re: Mini-site outage (sessions? lock period?)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Did you have any monitoring on the server (e.g. munin or similar) that you could check for the time in question?

What, roughly, is the spec of your server? That's enough students to wipe out a small server (as panic sets in and they start hitting refresh it just spikes and the machine goes down). 

I suggest you read - http://docs.moodle.org/25/en/Performance_recommendations

In reply to Howard Miller

Re: Mini-site outage (sessions? lock period?)

by Rebecca O'Connell -

We have the httpd logs, which our server admin says don't seem to indicate a server outage, and the Moodle Log, which I checked. The Moodle log indicates a seven minute gap in the entries, followed by three minutes with 30-40 entries per minute (I'm seeing periods where we get as many as 100 entries per minute without a gap), followed by a three minute gap.

Our server specs are:
Processors (2): Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
cpu MHz: 2396.863
RAM: 3831 Swap: 3999
Disk: 1649.3 GB (1.2T used)
 
Would overwhelming the server in general cause it to temporarily stop responding? If it is something to do with lock contention, is there a way to address that?
In reply to Rebecca O'Connell

Re: Mini-site outage (sessions? lock period?)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Without any useful measurements I doubt you will get to the bottom of this. I would advice installing munin (https://help.ubuntu.com/12.04/serverguide/munin.html) so you might get a clue if it happens again. This logs all sorts of parameters over time - so you'll see if you ran out of RAM etc.. Also (but not as a substitute) think about Google Analytics or similar.

If you haven't done so already, you need to attend to Apache and MySQL tuning. Out of the box, Apache will burn up all your memory and MySQL is generally far too conservative. If this is wrong then the number of users you have could conceivably overwhelm the server.

You could do some load testing with something like JMeter (http://docs.moodle.org/dev/JMeter) but that can be tricky.