Stack Matrix Hub (10)
mod_quiz Autosave AJAX Interval & PHP-FPM Burst Smoothing
Quantify how Moodle 60-second quiz autosave periods create periodic request waves and how widening autosaveperiod slashes peak worker pressure.
autosaveperiod 60s -> 120s cuts AJAX RPS 50% · Redis lock keeps saves < 25ms
Calculating Autosave Request Waves Across 500 Exam Takers
With 500 students answering essay or multi-part questions at a 60-second autosave interval, mod/quiz/autosave.ajax.php triggers 8.3 steady PHP writes per second—plus spiky bursts whenever an entire classroom opens the quiz simultaneously.
Tuning quiz/autosaveperiod Without Risking Student Answers
Increasing Site Administration -> Plugins -> Activity modules -> Quiz -> Autosave period from 60 seconds to 120 seconds cuts background autosave PHP invocations by 50% while preserving answers on page navigation clicks.
Measured Thresholds & Configuration
| Concurrent Takers | 30s Autosave RPS | 60s Autosave RPS | 120s Autosave RPS |
|---|---|---|---|
| 200 Students | 6.7 req/s steady | 3.3 req/s steady | 1.7 req/s steady |
| 500 Students | 16.7 req/s steady | 8.3 req/s steady | 4.2 req/s steady |
| 1,000 Students | 33.3 req/s steady | 16.7 req/s steady | 8.3 req/s steady |