mongoDB v4.0.4 >> replica set of 3 nodes (not sharded)
su - mongo7937 No directory, logging in with HOME=/ $ ulimit -Hn 1048576 $ ulimit -Sn 1024 $ cat /etc/pam.d/common-session | grep pam_limits.so cat /etc/sysctl.conf | grep fs.file-max
su - mongo7937 No directory, logging in with HOME=/ $ ulimit -Hn 1048576 $ ulimit -Sn 64000 $ cat /etc/pam.d/common-session | grep pam_limits.so session required pam_limits.so cat /etc/sysctl.conf | grep fs.file-max fs.file-max = 2097152 sysctl -p
So earlier my max number of connections were limited to 818 which is 80% of 1024. As per recommendation from mongoDB documentation I’ve increased the limit to 64000 but still when mongo c# client reaches max open connections to 818, my mongoDB abruptly stopping.
Is there working command set for c sharp driver to limit number of connection client end ? because whatever we tried is not working, can someone share if that is working for you.
Else can someone tell me the right steps to limit number of open connections from mongoDB side and at server user level.