My app has been having some serious memory issues. I am running Python 3.6, Django 1.10, running memchached on Heroku. Database contains about 1,000,000 rows of data.
In an attempt to get app to better perform I have change most query's related and prefetch related. None of this seemed to help so I have scaled up the Dyno's in an attempt to wrangle the memory issues but no matter how many I run I am still getting memory issues. There is really no load on the Dyno's themselves. Just straight memory issues.
The memory will shoot up to 768 mb and will not release this memory till I restart the dynos or app itself.
I am looking for any suggestions into improving the memory issues. I have thought of running garbage collection at some point to lower the memory but I have never actually used this in django. If anyone has experience with that will be helpful. Other than that I am pretty much mind blown where the memory leaks can be.
Thanks in advance.