instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.41k stars 2.42k forks source link

Monthly tables are missing, leading to server errors #2323

Closed Florian-Kranz closed 4 months ago

Florian-Kranz commented 4 months ago

Summary:

Yesterday everything was working fine, today quizzes are not working. Log says:

[CANVAS_ERRORS] EXCEPTION LOG ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "public.quiz_submission_events_2024_3" does not exist LINE 1: INSERT INTO "public"."quiz_submission_events_2024_3" ("attem...

I found #1945 but running Messages::Partitioner.process to create the missing tables returns => [].

Digging deeper, i found out, that actually none of the 'monthly tables' have been created. For example auditor_feature_flag_records_2024_3 and auditor_grade_change_records_2024_3 are missing too.

Steps to reproduce:

Not sure.

Expected behavior:

Monthly tables should be created automatically. (Worked up to this point)

Actual behavior:

Monthly tables were not created automatically.

Additional notes:

The instance has always been stable. No changes to the configuration has been made recently.

amg-web commented 4 months ago

i would check if canvas_init is running

Florian-Kranz commented 4 months ago

Thanks @amg-web for the reply!

Today canvas is working again, i assume tonight a scheduled job ran and created the tables.

Maybe the reaseon for not creating could have been some sort of timezone missconfiguration and the fact that its a leap year?? I really dont know, just poking in the dark...

amg-web commented 4 months ago

there is only one reason: canvas_init is down more then 2 weeks

Florian-Kranz commented 4 months ago

Alright, thanks for the clarification. For future reference, how do i make sure it is running?

amg-web commented 4 months ago

you can try to schedule restart, e.g. weekly