Applications with leaky code can birth zombie workers that never die. Unfortunately, we can't simply employ a garbage collection process because a job on one server could be tasked to kill a job on another server (similar #6)
Let's take a simpler approach:
[ ] Add a started_date column to the jobs table to track when jobs are created.
[ ] Support a maximum execution time for each job.
[ ] Support a maximum number of jobs that each worker can pick up.
[ ] Have an optional second WP-CLI command to be called from system cron that will perform a garbage collection process on zombies that are older than max execution time x max number of jobs.
Applications with leaky code can birth zombie workers that never die. Unfortunately, we can't simply employ a garbage collection process because a job on one server could be tasked to kill a job on another server (similar #6)
Let's take a simpler approach:
started_date
column to the jobs table to track when jobs are created.