Lately sidekiq has been leaving a lot of processes around in the stopping state.
My coworker asked me if there as a command to kill them all.
Of course with linux there are a lot of tools to perform this.
In this case however we had to kill the process based on the long listing of it.
ie instead of killall ruby we had to match an argument to the process
sidekiq 2.17.3 whi [0 of 6 busy] stopping
The key was matching “stopping”, which would leave the other sidekiq processes running.
pkill -f stopping
and this worked perfect the first time.
I go to another box and it won’t work.
The command sudo -f stopping does nothing, no error but the processes don’t die.
I upgrade the package, read the man page, search the internet.
Am I going insane? Did I forget everything I know about linux?
Then I become root and run the command…….it works.
The difference was sudo vs. being root.
Of course when you sudo the command there is no warning and the man page doesn’t contain the word sudo.
So word to the wise, when in doubt become root!