Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Possible memory leak issues in Puma. #218

Open
ozzyjohnson opened this issue Sep 15, 2015 · 3 comments
Open

Possible memory leak issues in Puma. #218

ozzyjohnson opened this issue Sep 15, 2015 · 3 comments

Comments

@ozzyjohnson
Copy link
Contributor

@GUI dropped a link about this the other day.

puma/puma#342

Today two instances crept over their limits - see cf events for details. The result is a spike in response time as the new droplet launches. The average doesn't look bad, but ~1% will be a multiple of that.

For the meantime, I'll see about cycling instances preemptively to keep this predictable.

@GUI
Copy link
Member

GUI commented Sep 15, 2015

Just for reference, when I hit this problem on other apps, I ended up adding a cronjob to periodically run pumactl restart on my app. It's certainly not ideal, but it should be a zero-downtime operation (although, there may be some brief pauses depending on whether your using hot or phased restarts). The puma_worker_killer gem referenced in that issue seems like it might do something similar, but integrated into the app (instead of cron). Or if it's easier for you to manage this on the CF side of thing, that might be better.

Unfortunately, I never had time to do a deep-dive into some of my apps to see if I could pinpoint the real issue that was causing memory growth, but based on that long-running issue we're at least not alone. So hopefully it will be fixed some day, but in the meantime, even with the hacky periodic restarts, the scalability benefits of Puma over other options has been a net win for most of my apps.

@ozzyjohnson
Copy link
Contributor Author

Thanks @GUI.

I'm liking the look of puma_worker_killer, more granular than handling things in CF.

@yozlet
Copy link
Contributor

yozlet commented Jan 28, 2016

Here's a direct link to the gem: https://github.com/schneems/puma_worker_killer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants