I have this very specific situation where I need one machine to serve a large number of MongoDB databases (such as 10k+) and every user should be able to connect to it directly. Our machine is quite powerful and it was running OK for a while, until a few days, when it started causing some problems.
At some point users can't login anymore and I get this from mongoS logs:
2016-08-19T18:08:16.667+0000 I NETWORK [mongosMain] pthread_create failed: errno:11 Resource temporarily unavailable I've tried to change most parameters MongoDB wise and SO wise, but no luck:
net.netfilter.nf_conntrack_max is 524288 fs.file-max is 128000 kernel.pid_max is 288000 /etc/security/limits.d/90-nproc.conf has: * soft nproc 128000 * hard nproc 128000
/etc/init/mongos.conf has:
limit fsize unlimited unlimited limit cpu unlimited unlimited limit as unlimited unlimited limit nofile 512000 512000 limit rss unlimited unlimited limit nproc unlimited unlimited limit memlock unlimited unlimited but still no luck.
Is there any way for me to handle like 100K+ connections?
Thank you in advance.