Closed hgeorgsch closed 4 years ago
By the way, this may or may not be related to #165
Checking some instances, there seems to be no inconsistency in the database, so the ERROR, presumably, indicates an INSERT operation being rejected. Thus we need to debug in moodle, and find out where and why this happens.
This is probably due to overloading the database, an issue which has been resolved in Moodle 3.9
On the production server, we see a large number of similar errors in the log: 2019-10-28 20:41:41.837 MET [25736] moodleuser@moodle ERROR: duplicate key value violates unique constraint "mdl_quesatte_queslo_uix" 2019-10-28 20:41:41.837 MET [25736] moodleuser@moodle DETAIL: Key (questionusageid, slot)=(1722, 3227) already exists. 2019-10-28 20:41:41.837 MET [25736] moodleuser@moodle STATEMENT: INSERT INTO mdl_question_attempts (questionusageid,slot,behaviour,questionid,variant,maxmark,minfraction,maxfraction,flagged,questionsummary,rightanswer,responsesummary,timemodified) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13) RETURNING id
Most of the activity is using CAPQuiz, and the server is reacting slow at the moment. The error seems to be an inconsistency in the database contents, and makes a plausible cause. Does anyone understand enough of the database to identify the underlying problem and/or correct the inconsistency?