Memory allocated per connection

Hi @Kim_Hakseon,

Each connection consumes up to 1MB of RAM. I believe this mentioned in a few places in the documentation, but didn’t find the reference I was looking for on a quick search.

This blurb from the MongoDB Atlas Best Practices is relevant:

MongoDB drivers implement connection pooling to facilitate efficient use of resources. Each connection consumes 1MB of RAM, so be careful to monitor the total number of connections so they do not overwhelm RAM and reduce the available memory for the working set. This typically happens when client applications do not properly close their connections, or with Java in particular, that relies on garbage collection to close the connections.

Additional RAM may be allocated for in-memory processing such as aggregation or in-memory sorting. Typically there is a memory limit to prevent one connection from consuming all server resources. The Limits: Operations section of the MongoDB manual has more details.

Regards,
Stennie