zombocom / puma_worker_killer

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

Blank mb used displayed in logs #45

Closed vcardillo closed 7 years ago

vcardillo commented 7 years ago

Rolling Restart. 2 workers consuming total: 761.38330078125 mb out of max: mb

config.ram is set: config.ram = 7500 # mb

schneems commented 7 years ago

Can you give me an app that reproduces the problem please

nritholtz commented 7 years ago

@schneems See https://github.com/nritholtz/puma_worker_killer-45

I put instructions to reproduce in the README.

schneems commented 7 years ago

Thanks for the app! I figured out what's going on here is where we're printing that value https://github.com/schneems/puma_worker_killer/blob/master/lib/puma_worker_killer/rolling_restart.rb#L15

We are getting the max ram from @max_ramwhich is never set, and frankly rolling restarts doesn't need to know about. I think this is because I copied and pasted a log statement from somewhere else. We should remove that part of the log statement all together. Do you have time for a PR?

schneems commented 7 years ago

Thanks again!