Cron crashes in adhoc task

Cron crashes in adhoc task

ដោយ Denis Featherstone នៅ
ចំនួនតប៖ 3

Hi,

We are running Moodle 3.9.1, Apache 2.4.46, PHP 7.4.9, MariaDB 10.5.4 on Windows Server 2016 (64 bit) virtual servers.

When our cron job runs it crashes when running the adhoc task course_delete_modules with the following error:


The PHP log shows the following


This only happens for a minority of records from the task_adhoc table. If I start deleting records that cause the problem the script will stop crashing until another problem record occurs.  I have not been able to see any difference between the records that work and those that cause a crash.

Hope that someone can help me with this.

Denis Featherstone

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Denis Featherstone

Re: Cron crashes in adhoc task

ដោយ Ken Task នៅ
រូបភាព Particularly helpful Moodlers

In your moodledata, remove the *contents* of /lock/.   Moodle will re-create what it needs - when it needs it.

Also make ownerships/permissions on /lock/ *very* liberal.  adhoc_task must be able do all things related to task which use locks.

adhoc_task is for 'spill over' (for lack of better term) of cron jobs that still need to run beyond the task schedule and locks are applied to prevent dups/other from kicking in on same job/task ... things like automated backups and other.

Above description may not be technically accurate ... but ... humanly understandable? ញញឹម

'SoS', Ken


មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Ken Task

Re: Cron crashes in adhoc task

ដោយ Denis Featherstone នៅ
Hi Ken,

Thanks for your suggestion but our system is using database locking the lock folder is always empty.

Denis
មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Denis Featherstone

Re: Cron crashes in adhoc task

ដោយ Ken Task នៅ
រូបភាព Particularly helpful Moodlers

Any specific reason for DB locking opposed to file?

That's like using DB for sessions ... some folks can run that way ... but many have switched to file.

Personally, I can see an advantage in file as opposed to DB in that nearly everything in moodledata will re-generate after manual removal of contents of directories (exception filedir).   With DB one has to do queries to remove rows.

Plus DB tweaks for fixing one thing may not be best overall.

'SoS', Ken

មធ្យមភាគនៃរង្វាយតម្លៃ: -