Mongo DB Memory Utilisation freezes app needs restart I am running a project using Mongo DB and Django, I have 2 separate instance for my Django project and database each 16GB ram t2xlarge ubuntu ec2 instances.
I am facing issue that within a day or two usage memory on DB server goes above 6GB and on app server it remains below 1GB but freezes application and need to restart machines to recover.
Any suggestions and help would be really appreciated.
Mongo will always use all free memory, eventually! That's why you don't put application(s) and mongodb to same server. However, you can use cgroups to restrict resource usage (memory, cpu,...) of mongo.