Debug-Info: Deadlock found when trying to get lock; try restarting transaction DELETE FROM mdl_question_response_count WHERE analysisid IN ( SELECT id FROM mdl_question_response_analysis WHERE hashcode= ? AND whichtries = ? AND questionid = ? ) [array ( 0 => 'e5a35043c618ec9d70e1e3e1e62ca7661cc246bb', 1 => 'alltries', 2 => '407045', )] Error code: dmlwriteexception Stack trace: line 497 of /lib/dml/moodle_database.php: dml_write_exception thrown line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end() line 1699 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end() line 216 of /question/classes/statistics/responses/analysis_for_question.php: call to mysqli_native_moodle_database->delete_records_select() line 140 of /question/classes/statistics/responses/analyser.php: call to core_question\statistics\responses\analysis_for_question->cache() line 753 of /mod/quiz/report/statistics/report.php: call to core_question\statistics\responses\analyser->calculate() line 724 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->analyse_responses_for_questions() line 675 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->analyse_responses_for_all_questions_and_subquestions() line 950 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->get_all_stats_and_analysis() line 2493 of /mod/quiz/lib.php: call to quiz_statistics_report->calculate_questions_stats_for_question_bank() line ? of unknownfile: call to mod_quiz_calculate_question_stats() line 8064 of /lib/moodlelib.php: call to call_user_func_array() line 140 of /question/classes/local/statistics/statistics_bulk_loader.php: call to component_callback() line 56 of /question/classes/local/statistics/statistics_bulk_loader.php: call to core_question\local\statistics\statistics_bulk_loader::load_statistics_for_place() line 1047 of /question/classes/local/bank/view.php: call to core_question\local\statistics\statistics_bulk_loader::load_aggregate_statistics() line 994 of /question/classes/local/bank/view.php: call to core_question\local\bank\view->load_required_statistics() line 777 of /question/classes/local/bank/view.php: call to core_question\local\bank\view->display_question_list() line 59 of /question/edit.php: call to core_question\local\bank\view->display()