I use Moodle 3.7.5 on my main plateform, using CentOS 7, with PHP 7.1.33 and MariaDB 5.5.64.
Since some days (2020-03-16), the meta-course enrolment sync task (enrol_meta\task\enrol_meta_sync) is very long to execute : it evolved from 240s (4 minutes) on 03/16 in the morning to 1000s the evening, then 1800s on 03/18, 4000s on 03/22, 5800s on 03/31 and 7200s today...
I've done some searches, and found MDL-52925, but i'm not sure it's really related. What i don't understand is why it evolves so quickly.
Some SQL queries, to have numbers:
SELECT COUNT(1) FROM mdl_user_enrolments;
SELECT COUNT(1) FROM mdl_user_enrolments WHERE enrolid IN (SELECT id FROM mdl_enrol WHERE enrol='meta');
SELECT COUNT(1) FROM mdl_user_enrolments WHERE enrolid IN (SELECT id FROM mdl_enrol WHERE enrol='meta')
AND timecreated > UNIX_TIMESTAMP ('2020-03-16');
I've tried to look in /enrol/meta/locallib.php file, the enrol_meta_sync function, but i don't really understand exactly what is done...
If someone can help me understand what happens, and what i could do, it would really help me.