Details
-
Question
-
Resolution: Gone away
-
Major - P3
-
None
-
2.13.3
-
None
-
None
Description
Summary
We upgraded to MongoDB c# driver 2.13.3 and noticed a huge increase in open ports. There doesn't seem to be a "cleanup" / "free" action running. This means the ports are only growing. And since windows has like a port limit (around 16K) that limit is reached after a few days
When analyzing, I see that ports are kept in state "Established", and never freed.
After downgrading to 2.10.3, I see that ports are used in the same way. But the biggest difference is that in 2.10.3 I see that ports are "freed" (put on Time Waiting) and then after some time freed to the system.
__
Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).
How to Reproduce
You can reproduce it with a simple test app that needs to be in waiting mode so the connection idle event can close the connections.
Use a tool like CurrPorts to see the port usage of the application. Switching the versions you will see the difference right away.
Additional Background
For us this is quite important since we are using a multi tenant database setup, where each customer has it's own database with credentials. This means we have a lot of connections (since the drivers creates a pool per clusterkey/database/username/password combination