#5586 - Task queue: Cron does not respect number of locked tasks; maybe it should

  • By
  • Added
  • 4 views
Identifier #5586
Issue type Feature request or suggestion
Title Task queue: Cron does not respect number of locked tasks; maybe it should
Status Open
Tags

Roadmap: Over the horizon (custom)

Handling member Deleted
Addon core
Description It is possible for a server to get overloaded with multiple tasks running at the same time. This is because Cron will start a new task from the queue regardless of the number of tasks locked.

Perhaps this behaviour should be modified. Maybe Cron should not start a new task if X tasks are currently locked, or maybe base it off of whether or not we are in failsafe or if (using the same criteria as the health check) resource use is high.
Steps to reproduce

Additional information Actually Cron loads up all of them at the same time. Maybe we should also limit this to X tasks per Cron execution. Though, if all of them are loaded up in one Cron, that means only one thread is dedicated to running all of the tasks, which may be okay until / unless we get more tasks queued between each Cron run.
Related to

#5656 - Optimise task queue more intelligently

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated