Issues with the Moodle Adhoc Task Queue

Issues with the Moodle Adhoc Task Queue

by Stefan Zimmer -
Number of replies: 7

Dear Moodle community,

I'm writing to seek your help with a problem I'm experiencing with the Moodle adhoc task queue. We have encountered an issue where two of our plugins were not functioning correctly, and as a result, the tasks from these plugins were not being executed properly. This has led to a significant backlog in the task queue, as you can see in the attached screenshot.

We have already taken the following steps:

  1. Disabled the problematic plugins.
  2. Removed the scheduled tasks from the queue that were associated with the disabled plugins.

However, even after these actions, the task queue remains very long, and we are now experiencing issues with other tasks being delayed due to the backlog.

I would appreciate any advice or suggestions the community can provide on how to resolve this issue and clear the task queue. Is there a way to manually execute or clear the remaining tasks? Are there any best practices or tools that can help manage the task queue more effectively?

Any guidance you can offer would be greatly appreciated. Thank you in advance for your help.

Best Regards
Stefan

Attachment Moodle_Adhoc.png
Average of ratings: -
In reply to Stefan Zimmer

Re: Issues with the Moodle Adhoc Task Queue

by Michael Hughes -
Picture of Core developers Picture of Plugin developers
Removed the scheduled tasks from the queue that were associated with the disabled plugins.
The adhoc-task queue and the scheduled-task queues are different, so have you purged the adhoc-tasks?
 

You'd need to have a look at the {task_adhoc} table.

M

In reply to Michael Hughes

Re: Issues with the Moodle Adhoc Task Queue

by Stefan Zimmer -
I can't even click on Adhoc Tasks (Server Error 500)
So how can I purge the adhoc-tasks?
In reply to Stefan Zimmer

Re: Issues with the Moodle Adhoc Task Queue

by Ken Task -
Picture of Particularly helpful Moodlers

Can you ssh into server?   If so there are some scripts in code/admin/cli/ that will help:

purge_caches.php adhoc_task.php cron.php uninstall_plugins.php

'SoS', Ken

In reply to Stefan Zimmer

Re: Issues with the Moodle Adhoc Task Queue

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Investigate the Error 500. Turn up Debugging to Developer and check your server logs. Something is clearly going wrong.
In reply to Stefan Zimmer

Re: Issues with the Moodle Adhoc Task Queue

by Stefan Zimmer -
Today I could fix everything.
- Deleted the bad plugins
- Deleted the adhoc tasks in the DB
- Updated Moodle and the server

Thank you all for your help!