This forum post has been removed
Number of replies: 5Hello Zdeněk.
Sorry to hear about your trouble. I suspect the actual problem happens when the cron attempts to run that course_delete_modules
ad hoc task. It probably fails or something, and somehow this failure is not properly caught (we spotted this unexpected behaviour elsewhere, too) and so the "lock was created but not released" is thrown as a consequence or not properly handling the error. In other words - the locking is not a problem, that ad hoc task is.
To debug, can you please try to run
# sudo -u www-data php admin/cli/adhoc_task.php --showsql --showdebugging --execute
(where "www-data" is the name of the owner of the moodledata owner user).
Let's see if that reveals something.
This forum post has been removed
This forum post has been removed
Thanks and happy to see this resolved! You may want to raise the problem with the maintainer of the Reservation module. As per https://moodle.org/plugins/mod_reservation their bug tracker is at https://github.com/bobopinna/moodle-mod_reservation/issues and I am sure they will appreciate to be aware of this discussion. Please feel encouraged to report a new issue for them.
Thanks David and Zdenek,
I think I fixed it, adding a check for not deleted users.
Pull the last commit on github to get it.
I'll made some tests to check if I need to add an orphan records discover procedure before publish a new release on moodle.org.
Cheers,
Roberto