1 Answer
1

What they try to tell is that you should first execute ulimit and then run mongod on the same shell session. This way Mongo DB process will have it's limits changed.

As you probably want to start Mongo DB using the startup script, the simplest solution would be modify this startup script and add ulimit call before starting Mongo DB daemon. This is still not the best solution to modify Mongo DB startup scripts.

The best way to deal with this problem would be changing limit defaults in file /etc/security/limits.conf or better adding specific configuration to /etc/security/limits.d See man pam_limits and man limits.conf for more information.