Hi there,
I'm running into an issue where for some reason Moodle isn't clearing adhoc tasks locks, which is preventing Moodle from sending outgoing mail. I'd like to do it manually, but I'm not 100% sure where to look ... but I have ideas
I'm running a Moodle cluster, v3.9.3 with a PostgreSQL 11 backend. There is a shared Redis instance, which is configured in config.php:
$CFG->lock_factory = '\\local_redislock\\lock\\redis_lock_factory';
So I'm going to assume that is where the adhoc task locks are being created and not in the database.
Below is an example of the errors I see in the Moodle cron log when the problem happens. Increasing the adhoc task concurrency limit in Moodle "fixes" the problem, until it recurs.
I'd like to go into Redis and clear out the offending task locks, assuming that's where they are. What should I be looking for? Are the key names just "mdl_tru_cron_adhoc_task_runner_0", "mdl_tru_cron_adhoc_task_runner_1", etc?
If so, can I just go ahead and delete them (assuming no cron tasks are running)?
Thanks!
----
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_0 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_0 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_1 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_1 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_2 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_2 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_3 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_3 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_4 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_4 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_5 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_5 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_6 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_6 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_7 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_7 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_8 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_8 lock
Redis lock; pid=133021; Waiting to get mdl_tru_cron_adhoc_task_runner_9 lock
Redis lock; pid=133021; Lock timeout, did not obtain mdl_tru_cron_adhoc_task_runner_9 lock
Skipping processing of adhoc tasks. Concurrency limit reached.