- changed status to resolved
Mixing of "section" and "id" in course_sections table causing 950.000 sections in a course
Hello,
in the last days we had several issues with courses, that hat a few hundred thousand (empty) course sections, causing the system to lock certain user actions (PHP Fatal error: Allowed memory size exhausted).
We are using Moodle 3.9.1+ and format_tiles version 2019052116
All of those courses used the tiles format, and one user reported us, that after adding a new section to a course it was labelled “Kachel 319847”. The courses_section-Table of moodle distinguishes between the primary key “id” and the sorting number “section”. It seems that under certain circumstances the new section gets the same value assigned in “section” as in “id”. So the sort order is something like 1, 2, 3, 319847.
When Moodle rebuilds the course cache it seems that it creates all “missing” sections. The user reported that this only happens if all sections are expanded and it is reproducable for her.
Unfortunately I could not reproduce this issue myself. Even if I log in as that user, I could not reproduce it, But the screenshot is more ore less an evidence.
Can you please investigate this issue, was the number of “ghost sections” is growing each time exponentially! This one had around 320.000, the last one produced more than 950.000 empty sections…
Kind regards
Comments (4)
-
repo owner -
reporter Thank you for your fast answer. I was not aware that the version from moodle.org differs from the one in the repository.
-
repo owner The latest 3.9 Beta is in the 3.9 branch - I will merge this into master
-
repo owner For anyone affected by this issue, the latest version of the plugin for Moodle 3.9 includes an experimental tool to help you to delete excess sections. You can access the tool Under Site Administration > Plugins > Course formats > Tiles format > Other > Problem courses
- Log in to comment
Hi this is a duplicate of issue
#45and the solution is the same, to upgrade the plugin to the latest version, so I am marking as resolved.It occurs when:
as a result of the above you then try to import into that course, or you back it up and try to restore it#39