It's my first post here (and one of my first technical post ever), please let me know if you have any feedback ;)
This is just the kind of post I would have loved to have found while dealing with this issue myself.
For further on this subject, this talk is great:
Thanks for this post! That gem looks handy.
For those running Rails & Puma, the gem puma_worker_killer can do this as well. The nice thing about that one is it will restart your dynos sequentially to avoid downtime.
I once made a pull request to puma_worker_killer to use the Heroku log drain to measure memory use and restart if it gets too high. Sadly, it didn’t get merged. 😢
This just saved me so many headaches! Thanks!
I'm glad it's useful!
I finally implemented this.
By the way t = Time.now.day.strftime('%H') should be t = Time.now.strftime('%H').
t = Time.now.day.strftime('%H')
t = Time.now.strftime('%H')
Thanks, I corrected it.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.