Our teachers are used to duplicate courses by copying course sections one after the other. They contain, among other activities, complete tests (Quizzes). One such action seems to the cause of the original problem.
The web server logs look like
6 January 2026, 11:14:05 AM [USER] User: [USER] Sharing Cart block_sharing_cart: backup section User with id 68 has backed up a section with id 53637 in course with id 3859
6 January 2026, 11:15:03 AM [USER] Course: [COURSE] Sharing Cart block_sharing_cart: restored section User with id 68 has restored a section with id 63355 in course with id 4581 that takes 0 seconds
6 January 2026, 11:15:03 AM [USER] Deleted forum (id '367508') Sharing Cart block_sharing_cart: restored course module User with id 68 has restored a course module with id 367508 in the course with id 4581 that takes 0 seconds
6 January 2026, 11:16:19 AM [COURSE] Course: [COURSE] Sharing Cart block_sharing_cart: restored section User with id 68 has restored a section with id 63356 in course with id 4581 that takes 1 seconds
6 January 2026, 11:16:19 AM [USER] Forum: [FORUM] Sharing Cart block_sharing_cart: restored course module User with id 68 has restored a course module with id 367509 in the course with id 4581 that takes 1 seconds
(160 such lines in total within about 20 minutes)
Although they say the transactions were finished, the committed memory jumped by 50 GB(!) during the same period making even the swap got exhausted and the OS started hunting processes, almost all killed processes were mariadb. That left Moodle with the unfinished tasks in the OP https://moodle.org/mod/forum/discuss.php?d=471223#p1893188.
Is this a bug in Sharing Cart?
Moodle 4.5.8+, mysql Ver 15.1 Distrib 10.11.14-MariaDB, PHP 8.1.34 (I know, support ended just 10 days ago. This is a heavy installation that needs a lot of planning before shifting. I have a staging server running PHP 8.3 to compare, if necessary)
Sharing Cart 5.0, release 6 2025092900
extramemorylimit is 512 MB (the default)
Edit: Found something suspicious: https://github.com/donhinkelman/moodle-block_sharing_cart/issues/257. Still would like to hear from the Sharing Cart side and how I could debug further.
