Issue: Moodle Becomes Non-Responsiveness for 10-15 minutes

Issue: Moodle Becomes Non-Responsiveness for 10-15 minutes

by Muhammad Abdul Basit -
Number of replies: 4

We were hosting our LMS Moodle 4.3+ on a server, equipped with an Intel Xeon E3-1275V6 Processor and 64 GB RAM, 2 x 480GB storage. During peak hours, the site typically sees 25-30 active users. On average, 10 users access the site simultaneously.

We are experiencing an issue where the Moodle application becomes unresponsive for 10-15 minutes (on average). The page continuously tries to load and after 10-15 minutes of non-responsiveness, either the page finally loads or it displays a "Gateway Time out" error message. It should be noted that the maximum execution time for a php script is 60 seconds. This issue persists even during off-peak hours when there are a maximum of 10 users online. The server stats also show that resources are plentiful, indicating that this issue is not related to server performance. It is likely a problem with the Moodle application itself.

We noticed that the system was running quite smoothly until we moved to Moodle 4.2 and particularly to 4.3+.  Yesterday we upgraded to 4.32 (the latest version) but it seems that the same issue persists. 

Can anyone guide what might be the issue and how can we debug and fix it? Thank you!

Average of ratings: -
In reply to Muhammad Abdul Basit

Re: Issue: Moodle Becomes Non-Responsiveness for 10-15 minutes

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Can you correlate those 10-15 minutes with anything, for example automated course backups in Moodle? Study Site administration > Server > Tasks for odd results.

This could very well come from outside, like other applications in the same server, or an overly complicated network setup. Study the error logs of the web server.
In reply to Visvanath Ratnaweera

Re: Issue: Moodle Becomes Non-Responsiveness for 10-15 minutes

by Muhammad Abdul Basit -
I cannot find a meaningful correlation for the non-responsiveness of the application. We have not established automated backups for the courses. Additionally, we use a dedicated server for this application, so external applications cannot interfere.
I have downloaded the csv from Site administration > Server > Tasks Logs and found that only one task fails daily at a specific time. The task is "Predict models\tool_analytics\task\predict_models". It does not appear to be the cause of the underlying issue.
In reply to Muhammad Abdul Basit

Re: Issue: Moodle Becomes Non-Responsiveness for 10-15 minutes

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
It looks like you have the moodle analytics turned on. I would start with disabling that. Additionally I would suggest looking at your DB for slow queries to help identify any other possible table locks or issues.