Gracefully shutting down sidekiq processes

ruby, sidekiq

Solution

Use this to kill sidekiq forcefully.

ps -ef | grep sidekiq | grep -v grep | awk '{print $2}' | xargs kill -9

Problem

Does anyone know how to find sidekiq's pidfile to gracefully shut it down? Running `ps ax | grep sidekiq` and then running `sidekiqctl stop <pid from grep>` consistently gives a `no such pidfile` error? Cntl-C and Cntl-D also seem to have no effect. Closing the process window and reopening a new window doesn't kill the process as it appears to be running as a daemon. The only consistent fix I've found is rebooting.

Original source