Hi,
I have a question, I've been working with Django for a short time and I've noticed that the more queries are made to the database, the more RAM memory fills up to the point that the instance freezes (aws EC2). What is the reason?
I've seen that they recommend using a cache manager, but does that really help?
Hello, I've had this problem for a few days now. I had an EC2 t2.micro instance and I decided to change it to t2.small. It worked fine for a while without filling up the memory, but because we work with large files and process them to later pass them to PostgreSQL, the same thing happened again when larger files arrived. I thought it was a Django caching problem.
I've been investigating and it turns out that because I run the project in production with Gunicorn, the worker was filling up and for some reason it was saving the information in memory. What I did was configure the number of workers and that every certain request the worker is cleaned. I also did the same with DjangoQ, which manages my asynchronous tasks.
So far I've done tests and everything works fine.
I left it here in case it helps someone.