DB Error while saving results and Numbas goes in to hung state

9 views
Skip to first unread message

Dev Shah

unread,
Feb 26, 2023, 10:28:05 PM2/26/23
to Numbas Users
We have a UAT\TEST env and when one of the user tried to ran the test in user preview mode and got attached error.

below is the extract from the user report on this error... 

"I managed to upload two tests using the LTI v3 to the staging environment (in the Play Site for MESH/Learning Modules/Testing for LTI v3.2) and tested them from using the student preview mode. The first test (Class test 1) ran okay and wrote marks back to the gradebook. The second test (Algebra 1 Diagnostic tool) ran in the student preview mode but then threw the following error .
 2023-02-27_12-06-13.png
The LTI server appears to be unresponsive again.
 
I also requested that both tests send an email to the user once completed which did not happen. This may be because student preview users don’t have a valid email address (??) but needs to be checked."

Has anyone come across this sort of error? Our UAT setup is identical to our Production setup.

Dev Shah

unread,
Feb 26, 2023, 10:33:29 PM2/26/23
to Numbas Users
below are logs for the Nginx and Postgres containers...

Ngingx: (Not sure which UPSTREAM connection this error refers to)

2023/02/27 03:28:45 [error] 36#36: *3382 upstream timed out (110: Connection timed out) while connecting to upstream, client: 172.18.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://172.18.0.14:8700/", host: "numbas-lti-provider-uat.westernsydney.edu.au"

Postgres: (Number of unique key violation errors)

2023-02-27 00:50:44.644 UTC [1309] ERROR:  insert or update on table "numbas_lti_attempt" violates foreign key constraint "numbas_lti_attempt_completion_status_el_2dc29def_fk_numbas_lt"

2023-02-27 00:50:44.644 UTC [1309] DETAIL:  Key (completion_status_element_id)=(1026) is not present in table "numbas_lti_scormelement".

2023-02-27 00:50:44.644 UTC [1309] STATEMENT:  UPDATE "numbas_lti_attempt" SET "end_time" = NULL, "completion_status" = 'incomplete', "completion_status_element_id" = 1026 WHERE "numbas_lti_attempt"."id" = 2

2023-02-27 00:52:17.437 UTC [1378] ERROR:  duplicate key value violates unique constraint "numbas_lti_scormelementdiff_diff_of_id_key"

2023-02-27 00:52:17.437 UTC [1378] DETAIL:  Key (diff_of_id)=(1218) already exists.

2023-02-27 00:52:17.437 UTC [1378] STATEMENT:  INSERT INTO "numbas_lti_scormelementdiff" ("element_id", "diff_of_id") VALUES (1215, 1218) RETURNING "numbas_lti_scormelementdiff"."id"

2023-02-27 00:53:46.620 UTC [1410] ERROR:  insert or update on table "numbas_lti_attempt" violates foreign key constraint "numbas_lti_attempt_completion_status_el_2dc29def_fk_numbas_lt"

2023-02-27 00:53:46.620 UTC [1410] DETAIL:  Key (completion_status_element_id)=(1221) is not present in table "numbas_lti_scormelement".

2023-02-27 00:53:46.620 UTC [1410] STATEMENT:  UPDATE "numbas_lti_attempt" SET "end_time" = NULL, "completion_status" = 'incomplete', "completion_status_element_id" = 1221 WHERE "numbas_lti_attempt"."id" = 3

2023-02-27 00:54:11.988 UTC [1431] ERROR:  insert or update on table "numbas_lti_attempt" violates foreign key constraint "numbas_lti_attempt_scaled_score_element_8b2b1d5e_fk_numbas_lt"

2023-02-27 00:54:11.988 UTC [1431] DETAIL:  Key (scaled_score_element_id)=(1312) is not present in table "numbas_lti_scormelement".

2023-02-27 00:54:11.988 UTC [1431] STATEMENT:  UPDATE "numbas_lti_attempt" SET "scaled_score" = 0.04, "scaled_score_element_id" = 1312 WHERE "numbas_lti_attempt"."id" = 3

2023-02-27 00:54:18.541 UTC [1439] ERROR:  duplicate key value violates unique constraint "numbas_lti_scormelementdiff_diff_of_id_key"

2023-02-27 00:54:18.541 UTC [1439] DETAIL:  Key (diff_of_id)=(1355) already exists.

2023-02-27 00:54:18.541 UTC [1439] STATEMENT:  INSERT INTO "numbas_lti_scormelementdiff" ("element_id", "diff_of_id") VALUES (1308, 1355) RETURNING "numbas_lti_scormelementdiff"."id"

2023-02-27 00:54:18.541 UTC [1435] ERROR:  duplicate key value violates unique constraint "numbas_lti_scormelementdiff_diff_of_id_key"

2023-02-27 00:54:18.541 UTC [1435] DETAIL:  Key (diff_of_id)=(1355) already exists.

2023-02-27 00:54:18.541 UTC [1435] STATEMENT:  INSERT INTO "numbas_lti_scormelementdiff" ("element_id", "diff_of_id") VALUES (1308, 1355) RETURNING "numbas_lti_scormelementdiff"."id"

2023-02-27 00:54:57.013 UTC [1481] ERROR:  insert or update on table "numbas_lti_attempt" violates foreign key constraint "numbas_lti_attempt_scaled_score_element_8b2b1d5e_fk_numbas_lt"

2023-02-27 00:54:57.013 UTC [1481] DETAIL:  Key (scaled_score_element_id)=(1505) is not present in table "numbas_lti_scormelement".

2023-02-27 00:54:57.013 UTC [1481] STATEMENT:  UPDATE "numbas_lti_attempt" SET "scaled_score" = 0.14, "scaled_score_element_id" = 1505 WHERE "numbas_lti_attempt"."id" = 3

2023-02-27 00:55:06.959 UTC [1489] ERROR:  insert or update on table "numbas_lti_attempt" violates foreign key constraint "numbas_lti_attempt_scaled_score_element_8b2b1d5e_fk_numbas_lt"

2023-02-27 00:55:06.959 UTC [1489] DETAIL:  Key (scaled_score_element_id)=(1548) is not present in table "numbas_lti_scormelement".

2023-02-27 00:55:06.959 UTC [1489] STATEMENT:  UPDATE "numbas_lti_attempt" SET "scaled_score" = 0.16, "scaled_score_element_id" = 1548 WHERE "numbas_lti_attempt"."id" = 3

2023-02-27 00:55:17.181 UTC [1504] ERROR:  insert or update on table "numbas_lti_attempt" violates foreign key constraint "numbas_lti_attempt_scaled_score_element_8b2b1d5e_fk_numbas_lt"

2023-02-27 00:55:17.181 UTC [1504] DETAIL:  Key (scaled_score_element_id)=(1612) is not present in table "numbas_lti_scormelement".

2023-02-27 00:55:17.181 UTC [1504] STATEMENT:  UPDATE "numbas_lti_attempt" SET "scaled_score" = 0.2, "scaled_score_element_id" = 1612 WHERE "numbas_lti_attempt"."id" = 3

2023-02-27 00:55:20.609 UTC [1506] ERROR:  duplicate key value violates unique constraint "numbas_lti_scormelementdiff_diff_of_id_key"

2023-02-27 00:55:20.609 UTC [1506] DETAIL:  Key (diff_of_id)=(1584) already exists.

2023-02-27 00:55:20.609 UTC [1506] STATEMENT:  INSERT INTO "numbas_lti_scormelementdiff" ("element_id", "diff_of_id") VALUES (1544, 1584) RETURNING "numbas_lti_scormelementdiff"."id"

2023-02-27 00:55:23.741 UTC [1510] ERROR:  duplicate key value violates unique constraint "numbas_lti_scormelementdiff_diff_of_id_key"

2023-02-27 00:55:23.741 UTC [1510] DETAIL:  Key (diff_of_id)=(1635) already exists.

2023-02-27 00:55:23.741 UTC [1510] STATEMENT:  INSERT INTO "numbas_lti_scormelementdiff" ("element_id", "diff_of_id") VALUES (1608, 1635) RETURNING "numbas_lti_scormelementdiff"."id"


Reply all
Reply to author
Forward
0 new messages