How do I clear stuck/stale Resque workers?

后端 未结 15 770
你的背包
你的背包 2020-12-07 07:22

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.

15条回答
  •  暖寄归人
    2020-12-07 07:59

    Run this command wherever you ran the command to start the server

    $ ps -e -o pid,command | grep [r]esque
    

    you should see something like this:

    92102 resque: Processing ProcessNumbers since 1253142769
    

    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 or QUIT -92102

    Let me know if you have any trouble.

提交回复
热议问题