Memory Leak / Crash Over Time
Hi Folks,
I love Jumpstart + Hatchbox combination and have ~ 32 apps across multiple clusters.
The clusters are heterogeneous (some big and chunky, and others small single-server deployments).
Unfortunately, I've found that all apps over time develop a memory leak and ultimately crash (to the point where I can no longer SSH into the server).
The different apps use different GEMs, different Ruby Versions, but the common denominator is that they're running various versions of Jumpstart.
Could you please point me in the direction on how to troubleshoot Rails/Jumpstart memory errors?
I know how much of a "how long is a piece of string" question this sounds, but any pointers would be much appreciated.
Cheers,
Marcus
I love Jumpstart + Hatchbox combination and have ~ 32 apps across multiple clusters.
The clusters are heterogeneous (some big and chunky, and others small single-server deployments).
Unfortunately, I've found that all apps over time develop a memory leak and ultimately crash (to the point where I can no longer SSH into the server).
The different apps use different GEMs, different Ruby Versions, but the common denominator is that they're running various versions of Jumpstart.
Could you please point me in the direction on how to troubleshoot Rails/Jumpstart memory errors?
I know how much of a "how long is a piece of string" question this sounds, but any pointers would be much appreciated.
Cheers,
Marcus
Hey Marcus,
I just went through a bunch of pain on this same topic.
My app, over time, would bloat to over 2GB, starting from about 300MB, and eventually crash. This wasn't evident on our main kit. But, when we started migrating to Kubernetes, we saw these problems fast.
So, we used a memory profiler (GetProcessMem gem) and watched it do its thing with a lot of logs. Found where we were "jumping up and down" in memory, and worked to fix those problems.
We ended up finding culprits that made the app consume much less memory.
The net is that with Garbage Collection, memory doesn't really ever reduce. The only app that stays stable is one that doesn't do anything in the outside world, IMO.
And, it's best practice to reboot the application occasionally to cleanup memory fragmentation. That, plus finding your hotspots, will get you a long way to a solution.
I just went through a bunch of pain on this same topic.
My app, over time, would bloat to over 2GB, starting from about 300MB, and eventually crash. This wasn't evident on our main kit. But, when we started migrating to Kubernetes, we saw these problems fast.
So, we used a memory profiler (GetProcessMem gem) and watched it do its thing with a lot of logs. Found where we were "jumping up and down" in memory, and worked to fix those problems.
We ended up finding culprits that made the app consume much less memory.
The net is that with Garbage Collection, memory doesn't really ever reduce. The only app that stays stable is one that doesn't do anything in the outside world, IMO.
And, it's best practice to reboot the application occasionally to cleanup memory fragmentation. That, plus finding your hotspots, will get you a long way to a solution.
Notifications
You’re not receiving notifications from this thread.