zombocom/puma_worker_killer

Not able to restart Puma Server after using Puma Worker Killer

achiinto opened this issue · 5 comments

My system is using Mina Deploy for automation and since Puma seems to be leaking memory even for such simple application, I have setup to use Puma Worker Killer for helps.

After the first deploy with the newly configured Puma Worker Killer, the system seems to behave normally. However, when I made some code changes to the system (not related to puma or killer), and deploy again, then the system started to fail.

It seems like running Mina Puma:restart/stop/start not longer function properly. Nginx seems to be pointing to the wrong things and Nginx and Puma are not resorting to the correcting binding. Puma stop would keep the socket in place while Puma start will not work due to the sock.

I had to fix this by reverting the system to not use Puma Worker Killer for the system to work again. Did I configured the Killer incorrectly? Is there any known compatibility issue?

I think it depends on where you put your starting code, there's some other issues about where exactly the best place is. If the startup code doesn't re-run when you restart then, PWK won't be active.

So your idea is that putting PumaWorkerKiller.start into the initializer is not enough. When calling a puma restart, say mina puma:restart, it somehow did not call the PumaWorkerKiller.start? And the Puma server somehow created pid and sock file that it later can not reference?

But wouldn't a Puma restart/start would have loaded the Initializer code for the PumaWorkerKiller.start?

Look at your logs, do you see puma worker killer after restart?

let me setup a sandbox instance to play with a bit and get back to you. Thanks.

My memory leak issue has been solved, so I think I won't get to it for a while. Let's close it for now.