Maximum execution time exceeded in Moodle web requests
0 reputation · 19 May 2020, 00:05 UTC
The goal is to define Moodle’s expected behavior when a web request is terminated by PHP’s execution-time limit, particularly when the documented $CFG->php_admin_time_limit setting overrides a script-specific limit. Assuming Moodle 4.3 or later on PHP 8.2, the relevant failure is “Maximum execution time exceeded”; behavior on other supported PHP releases and during client disconnects needs current verification.
A key design decision is whether this failure should pass through Moodle’s normal exception and error-reporting path, or remain a PHP fatal termination visible mainly in logs. The policy must distinguish execution-time exhaustion from request cancellation without assuming that CLI cron or upgrade tasks share web-request semantics. Cleanup expectations for database transactions, output buffers, and temporary resources also need to be explicit.
Should Moodle surface a timeout-specific user message while retaining the original diagnostic in logs, or preserve the generic fatal-error response? Which observable states and log events should tests require to confirm that timeout handling and resource cleanup remain correct across supported Moodle and PHP versions?