PDOException / Integrity constraint violation: 1062 Duplicate entry

Created on 10 January 2019, almost 6 years ago
Updated 18 March 2023, almost 2 years ago

We occasionally see duplicate entry errors on our site with around 800 users.

https://sitename.nu|1546954058|php|145.102.243.86|https://sitename.nu/node/370/take/1|https://sitename.nu/node/370/take/1|53536||PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '28950714' for key 'result_answer_id': INSERT INTO {quiz_multichoice_user_answers} (result_answer_id, choice_order) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array#012(#012 [:db_insert_placeholder_0] => 28950714#012 [:db_insert_placeholder_1] => #012)#012 in MultichoiceResponse->save() (line 862 of /data/www/p.sitename.nu/web/sites/all/modules/contrib/quiz/question_types/multichoice/multichoice.classes.inc).

When this happens it seems to happen for all users taking this quiz. This soon results in "Too many connections" errors as the table seems to be locked for a while.

Users get a 503 error page.

As for now we have no clue as to what triggers these problems.

🐛 Bug report
Status

Active

Version

5.3

Component

Code - Multichoice

Created by

🇳🇱Netherlands Johan den Hollander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024