Repeated System Timeouts

Repeated System Timeouts

by Jakob Syvertsen -
Number of replies: 5

Hello,

Our company maintains a rather large moodle server (60k+ students). Over the last few weeks, we have been receiving regular reports about the system timing out during quiz attempts from some of our classes. The server itself has 80+ GB of memory on it.

My theory is that it has something to do with the very large number of "Course delete modules" ad-hoc tasks being called every day. Each of these tasks often uses thousands of reads and hundreds if not thousands of writes to the DB to delete what appears to be a single course module. We maintain the database on a separate Amazon RDS server, but I'm worried that the frequent course delete modules tasks are somehow blocking users from completing quizzes and thus timing out the system.

Some things I have tried:
1) Raising the maximum task concurrency limit back to the default of 3 (we had lowered it to 1 due to a previous issue).
2) Raising the PHP memory limit to 4096M.
3) Increasing the size of the server to 36 vCPUs and 96 GB of memory.
4) Raising the current MaxRequestWorkers from 400 to 600.

Perhaps related to this issue, the /moodledata/temp/backup folder is constantly filling up with junk, though I think that has more to do with course restoration than it does with this.

We are running Moodle 4.5.5+, PHP 8.1, on an Apache server. 

Thank you for your help!

Average of ratings: -
In reply to Jakob Syvertsen

Repeated System Timeouts

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

Have you resolved the previous problem, Course Restore stalling out and never completing? If not, your server is not properly set. Throwing more hardware at it is not the most sensible solution. Monitor the server properly and find the weak/malconfigured point.
 
P.S. Do follow-up the initial issue in the original discussion until it is solved. You were getting help, and there was a long discussion, please don't repeat it here.
 
Edit. "If your problem is solved, reply to the thread, adding [Solved] to the subject line of your post. Share links to documentation, discussions or tracker issues that helped you." (from the Code of Conduct)
 
In reply to Visvanath Ratnaweera

Repeated System Timeouts

by Jakob Syvertsen -
Yes, the previous issue appears to have been resolved since, I have not gotten any other reports about the previous issue.
In reply to Jakob Syvertsen

Repeated System Timeouts

by Ken Task -
Picture of Particularly helpful Moodlers

Could be victum to recyclebin settings.   Set duration to keep for 1 second ... that hurries along anything deleted to moodledata/trashdir where you can remove manually.   Also set recyclebin to display all the time in course admin menu.  Visit a troubled course to see what might be in recyclebin la-la-land.

After staff has cleaned up whatever, reset recyclebin duration to something sane.

Also install Health Center plugin

https://moodle.org/plugins/tool_health

run it during non-prime time if you can.   You might have some quiz bank issues due to clean ups. [Hope not! Cause some of those are doozees! sad]

Also, install MySQLTuner ... a pl script ... on web server.  Run it with superuser creds from your web server at your DB server.   See what it might recommend for tweaks to DB config.

And, from CLI in moodle code directory:

ps aux |grep php

Do you see php-fpm?   Seems to be the 'darling' config these days ... config file for php-fpm might need some tweaking as well.

'SoS', Ken

In reply to Ken Task

Repeated System Timeouts

by Jakob Syvertsen -
Thanks for the advice! I'm going to discuss with the boss today about implementing these suggestions over the weekend, I'll report back if we notice any changes.
In reply to Jakob Syvertsen

Repeated System Timeouts

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
Having a large number of students attempting to start a quiz at the same time is a known issue as the DB needs to create the attempt for each student and can get bogged down. To mitigate you can have the system pre-create attempts over a set time period which may improve this dramatically documentation link below

https://docs.moodle.org/500/en/Quiz_settings#Site_administration_settings
Average of ratings: Useful (2)