Cron error (course_delete_modules & lock)

This forum post has been removed

Number of replies: 5
The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Cron error (course_delete_modules & lock)

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Hello 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.

Average of ratings: Useful (2)
In reply to David Mudrák

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to David Mudrák

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Cron error (course_delete_modules & lock)

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

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.

Average of ratings: Useful (1)
In reply to David Mudrák

Ri: Re: Cron error (course_delete_modules & lock)

by Roberto Pinna -
Picture of Core developers Picture of Plugin developers

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