Skip to content

Fix resque worker becoming paused on restarts

Created by: abevoelker

My resque worker would not run jobs after doing a /etc/init.d/gitlab restart. I finally noticed that looking at the process status in ps showed that it said Paused. I looked up the signals for resque and it turns out that the USR2 signal the init.d script is sending is specifically for pausing the worker (to unpause, use the CONT signal).

Instead of adding an extra kill -CONT step, I think that it makes more sense to just to take out the resque kill codes as I believe the Unicorn signals page shows that kill -USR2 is a non-blocking operation, so you would effectively immediately pause and unpause your resque worker for no reason.

If the script gets cleaned up to properly restart Unicorn it would probably make sense to put in kill -USR2 $RESQUE_PID; <restart Unicorn>; kill -CONT $RESQUE_PID.

Merge request reports