Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to flush memory on Heroku dynos?

I'm working on a Python/Django app on Heroku at the moment and I am running into issues with memory.

I have a leak (or two or three), but in order to help test it would be great to be able to reset the dynos so they're free and clear so that the tests don't "pollute" each other. I've tried the "restart" command, but that just seems to restart processes/services on the dyno and doesn't clear memory.

Searches haven't turned up much that is helpful, do you happen to know if this is possible?

like image 228
maznika Avatar asked Aug 06 '12 23:08

maznika


1 Answers

heroku restart will spin up entirely new dynos. Since we don't have any shared memory state between dynos, when you restart and get a new dyno you should be starting with a clean slate.

See https://devcenter.heroku.com/articles/ps#process-restarts for more information.

like image 146
Oren Avatar answered Nov 07 '22 20:11

Oren