MongoDB RAM Usage Increasing Too Much

We have recently moved to Mongo and deployed all of our microservices in production. We have about 7 .NET microservices and 1 Node.js services which uses Mongo. We are using Mongo for logging and we write about 100,000 logs everyday in the database. After moving to production, I am seeing that RAM usage on the server is increasing every day. On first day it was at 10% and just in 3 days, it is using 35% of the RAM.

I am wondering if we are doing anything wrong. Do we need to close the connection with Mongo every time we access it from out microservices ? Can it be happening because of some types of locks ?

When I looked in detail, it is says “RAM Used” about 15GB and “RAM Cache + Buffer” is also about 15 GB.

Please guide as this is prod, I am worried that applications might get very slow if the RAM usage keeps increasing like this.

Thanks
JW

Hi Jason,

If you are looking at the RAM utilisation on the server that MongoDB is hosted then you can expect the RAM allocated to MongoDB to grow up until the wiredTigerCacheSizeGb threshold. If this hasn’t been set manually, then this threshold will be 50% of system memory - 1GB.

Thanks,
Mark

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.