System was using moodle 3.5 along with php 7.2 and mariadb 10.2.
Server was with 4GB of ram and almost 2GB of free RAM and almost swap was available.
What can be causing this issue for 20 clients who were attempt for 40 MCQs.
at some point loading time also around more than 1sec.
noticed that processattempt.php?cmid=25 take more than 30s
What counts is what the server is doing during that time.
you mean process count?
I can't exactly remember but this was happened when only one user accessing moodle.
I mean *everything*. What have you in place to monitor server activity?
Uptime: 1759 Threads: 13 Questions: 6776 Slow queries: 0 Opens: 87 Flush tables: 1 Open tables: 81 Queries per second avg: 3.85
Please note that I could not collect my details when the incident happened (at that time system was booted using USB drive instead of local disk).
Above stats from same moodle system but on a VM with 1.5GB RAM and Single core CPU and only single user on moodle.
I am planning to reproduce the same issue within next few days.
It would be great if you can mention what stats may specially required in terms of moodle issues.
DB: Mariadb 10.2
Btw, why disk InnoDB disk writes instead of reads during a exam where user just moving one question to another without selecting an answer?
Is that due to moodle keep writing current working page/question?
This server suppose to serve users 20-50 at a time.
I highly appreciate if you can mention any recommended configuration available.
"Please note that I could not collect my details when the incident happened (at that time system was booted using USB drive instead of local disk)."
Is it just me that thinks that might have been the problem...
The point is to look at every bit of information you can find while reproducing the incident and see if anything jumps out. It's not very scientific - but that's the place to start.
What operating system? What web server?
Define 'timeout'? What exactly happened? What was logged in the web server's error log?
"almost swap available"?? If you have used swap *at all* then your system is dead. Make sure that the web server is tuned not to consume all the memory. 4GB isn't a huge amount.
OS: Fedora 28
Web server: httpd 2.4.34
Didn't noticed that swap is in use.
>Make sure that the web server is tuned not to consume all the memory. 4GB isn't a huge amount.
No tuning done either db or web server side yet.
httpd error log
[Thu Jan 17 12:51:31.779484 2019] [proxy_fcgi:error] [pid 1831:tid 139642229729024] (70007)The timeout specified has expired: [client 192.168.1.60:47594] AH01075: Error dispatching request to : (polling), referer: http://mydomain/myexam/mod/quiz/attempt.php?attempt=6&cmid=26&page=1
[Thu Jan 17 12:51:37.717817 2019] [proxy_fcgi:error] [pid 1833:tid 139642833708800] (70007)The timeout specified has expired: [client 192.168.1.61:46954] AH01075: Error dispatching request to : (polling), referer: http://mydomain/myexam/mod/quiz/attempt.php?attempt=8&cmid=26&page=1
40 questions all on one page? That is quite a load. You need to put your questions on separate pages, that will help a lot.
I would agree, Emma, especially if every question had a graphic or a video.
I also wonder how the exam is being administered. If the instructor says "Everyone must start exactly at 11:00 AM", this kind of spike in demand might cause the problem. I avoid this kind of issue by allowing my students to take exams over a span of hours, such as 24 hours. I try to avoid "concurrent use" situations.
I only have a slight "feel" for this problem. My VPS is configured with a similar server. Every so often, I might experience a slight delay. It is never long, nor irritating. So I do the natural thing, I make a slight mental note, then ignore it.
The other day, I was manually grading a quiz question where I show students a video and ask "Does this play." I had decided to display all 29 responses at once. Well, I noticed that my videos took a little while to display in each shown question. Then I remembered that Moodle needs to render the first frame of every video, which caused the display. It took, oh, maybe 3 or 4 seconds to do so.
There were 1 question per page and 40 pages for total of 40 MCQs + few pages for structured questions.