As you can see from the attached image, I've got a couple of workers that seem to be stuck. Those processes shouldn't take longer than a couple of seconds.
I'm not sure why they won't clear or how to manually remove them.
I'm on Heroku using Resque with Redis-to-Go and HireFire to automatically scale workers.
If you are using newer versions of Resque, you'll need to use the following command as the internal APIs have changed...
Here's how you can purge them from Redis by hostname. This happens to me when I decommission a server and workers do not exit gracefully.
I've cleared them out from redis-cli directly. Luckily redistogo.com allows access from environments outside heroku. Get dead worker ID from the list. Mine was
Run this command in redis directly.
You can monitor redis db to see what it's doing behind the scenes.
Second last line deletes the worker.
I ran into this issue and started down the path of implementing a lot of the suggestions here. However, I discovered the root cause that was creating this issue was that I was using the gem redis-rb 3.3.0. Downgrading to redis-rb 3.2.2 prevented these workers from getting stuck in the first place.
I had stuck/stale resque workers here too, or should I say 'jobs', because the worker is actually still there and running fine, it's the forked process that is stuck.
I chose the brutal solution of killing the forked process "Processing" since more than 5min, via a bash script, then the worker just spawn the next in queue, and everything keeps on going
have a look at my script here: https://gist.github.com/jobwat/5712437
Run this command wherever you ran the command to start the server
you should see something like this:
Make note of the PID (process id) in my example it is 92102
Then you can quit the process 1 of 2 ways.
Gracefully use
QUIT 92102
Forcefully use
TERM 92102
* I'm not sure of the syntax it's either
QUIT 92102
orQUIT -92102
Let me know if you have any trouble.