-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.2.6
-
Component/s: None
-
None
-
ALL
Mongos don't proactively clear the cached metadata unless it was the mongos that dropped it (or when it tries to perform an operation on a namespace that was already dropped), so cached metadata for dropped collections can stay in the cache forever. This can be problematic for use cases where sharded collections are constantly being created and dropped, as they in theory should net no additional memory required, but will cause mongos to slowly accumulate chunk metadata for old dropped collections.
Original title: mongos memory footprint keeps increasing
Original description
Machine type: Amazon Linux 2
Shard count: 5
Cluster Architecture: PSA
Config nodes: 3
Mongo Version: 4.2.6
We have a mongos running on each application server instance. The mongos seems to continuously keep on accumulating memory overtime until the mongos service is restarted.
I don't see a mongos configuration option (https://docs.mongodb.com/manual/reference/program/mongos/) to control the memory growth beyond a certain threshold. Can it be configurable like wiredTigerCacheSize?
This seems like a memory leak issue! Is there a way we can inspect what kind of mongos related data is stored in memory?
Attaching the serverStatus output..
Thanks,
Stephen
- related to
-
SERVER-50944 Add number of chunks and estimated routing table size to serverStatus metrics
- Closed
-
SERVER-49697 Callers should clear their shared_ptr to ChunkManager before blocking for refresh
- Closed