resque: prune_dead_workers doesn't work on heroku cedar
Because heroku run’s every process in a separated closed environment the ps command doesn’t list any worker processes.
We are currently running in some problems with heroku because they don’t gracefully kill workers on deploy or restart. This causes old workers to stay “alive” in redis. I’m not really sure if either heroku should kill workers gracefully or if resque should look into an other way to check alive workers. It might be an idea to let a worker update a timestamp or something in redis once in a while and that resque will cleanup workers which havn’t checked in for x seconds/minutes. I would be open to contribute for this issue but would like to discuss things first (maybe there is already a solution or i just do something wrong).
About this issue
- Original URL
- State: closed
- Created 15 years ago
- Comments: 138 (41 by maintainers)
We were still seeing zombie workers with
RESQUE_TERM_TIMEOUTandTERM_CHILDset.This is the solution we have in place now, which uses the
heroku-apigem to unregister and restart all processes every two hours via a rake task/cron job.Not the cleanest but it works. Looking forward to a better solution to this.