zombocom / puma_worker_killer

Automatically restart Puma cluster workers based on max RAM available
748 stars 77 forks source link

Add optional setting to configure delay between worker reaps. #58

Closed papile closed 4 years ago

papile commented 6 years ago

I had an application that had a several minutes long on_worker_shutdown routine. The period between worker terminations was not user configurable and defaulted to 60 seconds. This left me in the situation where all my workers would then be sent TERM before they completed and spawned another. My application was then not responding until at least one worker completed.

This PR adds a user configurable delay between worker kills. I am not sure how useful this is for others, but I figured I'd offer it up for inclusion.

SuperQ commented 4 years ago

It looks like this needs a rebase.

schneems commented 4 years ago

I think #78 covers this and is a bit more generic (provided the changes I asked for are implemented). Can we move to that PR?