Switching to heroku cedar-14 leads to continous increase in memory consumption

走远了吗. 提交于 2019-12-03 07:18:41

Here is a nice link for your 'problem' : http://blog.codeship.com/debugging-a-memory-leak-on-heroku/

It describe perfectly the continous increase in memory over time. The same 'problem' happen with Puma, there is also a Puma Worker Killer Gem

One thing to note is that you can tune your garbage collector Configuration to be more agressive. Just be careful, you can mess pretty everything with a single bad configuration.

There is -at the moment- no magic solution for this problem. We encounter it too in production, however the memory usage sometimes stabilize, just below the limit where swapping start.

As an immediate action, we choose to reduce the number of workers per dyno, reducing it to 2, and increasing the number of dyno dynamically with HireFire.

You have a loot of tools that can help, here is a list we use each days to track expensive queries / allocations :

Good luck, it's not a simple problem to solve and I don't think that there is a universal true solution for it right now.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!