Very frequently php-Resque workers will be stuck on a job for days, and eventually all the workers gets stuck and the site stops working.The
To prune the workers manually, include the vendor/chrisboulton/php-resque/lib/Resque/Worker.php file, instantiate a Worker, then call pruneDeadWorkers();
<?php include 'vendor/chrisboulton/php-resque/lib/Resque/Worker.php'; // If you're not already using composer autoloader $worker = new Worker('default'); // the argument doesn't matter $worker->pruneDeadWorkers();
php-resque is not shipped with a function to restart workers, take a look at fresque for that.
To avoid having dead workers, compile your php with
pcntl_fork, to execute your jobs in a fork, and isolating them from the workers.