-
Bug
-
Resolution: Fixed
-
Minor
-
4.2.2
Currently this is hardcoded to kill the task after it's been running for an hour.
This reports back as task failed rather than task succesful which then introduces a fail delay.
I'm not clear why it's using this arbitrary 1h value rather than $CFG->task_scheduled_max_runtime if anything.
But if this is to avoid hogging the task processing, that's fine to break up in parts but really needs to be able to catchup with itself without being marked as failed.
Clearly 1h will be far too low for a big site like ours.
While there was a stack trace along the way this doesn't seem to be the reason the task ended but maybe it's causing of the false positive failed status
42424bf30553:1092914 This task has been running for more than 1 hour so stopping this execution. |
42424bf30553:1092914 ... used 335926 dbqueries |
42424bf30553:1092914 ... used 4345.8472127914 seconds |
42424bf30553:1092914 Scheduled task failed: Recalculate question statistics (quiz_statistics\task\recalculate),Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays |
42424bf30553:1092914 Backtrace: |
42424bf30553:1092914 * line 564 of /question/engine/datalib.php: call to moodle_database->get_in_or_equal() |
42424bf30553:1092914 * line 295 of /question/classes/statistics/questions/calculator.php: call to question_engine_data_mapper->load_questions_usages_latest_steps() |
42424bf30553:1092914 * line 96 of /question/classes/statistics/questions/calculator.php: call to core_question\statistics\questions\calculator->get_latest_steps() |
42424bf30553:1092914 * line 654 of /mod/quiz/report/statistics/report.php: call to core_question\statistics\questions\calculator->calculate() |
42424bf30553:1092914 * line 945 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->get_all_stats_and_analysis() |
42424bf30553:1092914 * line 108 of /mod/quiz/report/statistics/classes/task/recalculate.php: call to quiz_statistics_report->calculate_questions_stats_for_question_bank() |
42424bf30553:1092914 * line 405 of /lib/classes/cron.php: call to quiz_statistics\task\recalculate->execute() |
42424bf30553:1092914 * line 208 of /lib/classes/cron.php: call to core\cron::run_inner_scheduled_task() |
42424bf30553:1092914 * line 125 of /lib/classes/cron.php: call to core\cron::run_scheduled_tasks() |
42424bf30553:1092914 * line 186 of /admin/cli/cron.php: call to core\cron::run_main_process() |
42424bf30553:1092914 |
- has been marked as being related by
-
MDL-79627 Update to 4.1.6 breaks on quiz statistics
- Closed
- is duplicated by
-
MDL-78730 Timeout of "recalculating quiz report" written in the code
- Closed
-
MDL-79500 Problem with task quiz_statistics\task\recalculate: moodle_database::get_in_or_equal() does not accept empty arrays
- Closed
- will help resolve
-
MDL-78580 Add locking to quiz statistics calculation to prevent database deadlocks
- Closed
-
MDL-78588 Question bank statistics: computing something, when it should only be using cached values
- Closed
-
MDL-75197 quiz_statistics table could usefully have a quizid column added
- Closed