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!