On rhel 6.6 (mongodb was installed with rpm) the issue of ulimits, documentation says the following:
Every deployment may have unique requirements and settings; however, the following thresholds and settings are particularly important for mongod and mongos deployments:
-f (file size): unlimited
-t (cpu time): unlimited
-v (virtual memory): unlimited
-n (open files): 64000
-m (memory size): unlimited
-u (processes/threads): 64000
i.e open file and process ulimit (soft and hard) should be set to 64000.
In the mongod init script (/etc/init.d/mongod), the start function sets process ulimit to 32000:
Here is a link to git :
While documentation recommends setting ulimit to 64000.
It is possible this is a documentation bug. If so, please move to DOCS.
Additionally, if /etc/security/limits.d/99-mongodb-nproc.conf file is created (as documentation recommends):
Then the ulimit set by the init script will be run over by the ulimit of 99-mongodb-nproc.conf file, and the ulimit will be set to the recommended.