11
votes

I am running an app which requires a library that leaks memory. (Unfortunately there is no alternative for this propriotory software). As a result the dynos exceed their memory limit and emmit Error R14 (Memory quota exceeded) errors.

Is there some way to automatically restart dynos that emit Error R14?

Or will Heroku actually restart the dynos for me and if yes roughly when? (could not find anything on this in the doc and i never noticed that heroku shut down my dynos)

Thank you a lot in advance!

Eddie

1

1 Answers

-2
votes

Heroku will automatically restart your dynos once they've exceeded both the dyno memory limits AND the dyno SWAP MEMORY limits. There are 2 separate limits.

When you see that Error R14 message, it means you've exceeded the memory limits -- but Heroku will keep your dyno running until you also run out of swap memory (which is sort of like fake memory that is persisted to the disk).

The downside to this is that your application will be a lot slower when using swap memory.

The good news is that if your application leaks memory fast enough, Heroku will restart it quickly anyhow =)