-
Bug
-
Resolution: Fixed
-
Major
-
2.7.11, 2.9.3, 3.1.2
-
MySQL
-
MOODLE_27_STABLE, MOODLE_29_STABLE, MOODLE_31_STABLE
-
MOODLE_31_STABLE
-
MDL-52186-master -
I've just finally understood a problem we have since more than one year, when using Moodle 2.7, and still present on Moodle 2.9.3 (and certainly 3.0, not tested).
If you have meta-course enrolments defined in a course, but greyed (suspended/disabled), then it generates LOTS and LOTS of enrolments and unenrolments, regularly, all days (at all cron?).
In my case i had a course with more than 1 500 000 lines of enrolments, and the same lines of unenrolments. And the same with "new" (from Moodle 2.7) logging and legacy logging.
So, to speak simply : 7 000 000 lines of logs for nothing, due to a bug.
And just for one course ; i had nearly 20 with this problem.
The direct consequence (other than charging the server and taking lots of disk space) is that it breaks backups, and also course reports
I suspect something is badly designed, always doing and undoing the same things
If it can help, i've made a discussion (in French, but) with lots of understandable queries and datas :
https://moodle.org/mod/forum/discuss.php?d=321252#p1293693 (for the start of the concerned messages)
If you want to test it, just :
- use a platform with cron working
- activate both legacy and normal logs
- create a course A, with (lots of) users
- create a course B, and define a meta-link enrolment, disabled, pointing on course A
- after some time, look at the logs tables for course B
With time, and cron executions, you'll see lots of things in :
- mdl_logstore_standard_log concerning eventname = '\\core\\event
user_enrolment_created' or eventname = '\\core\\event
user_enrolment_deleted' - mdl_log concerning action='enrol' or action='unenrol'
Séverin