MongoDB 4.4 and limits


I deployed MongoDB 4.4 on Centos 7 (with YUM).

I followed the instructions and created the file /etc/security/limits.d/99-mongodb-nproc.conf and wrote this values :

mongod soft fsize   unlimited
mongod hard fsize   unlimited
mongod soft cpu     unlimited
mongod hard cpu     unlimited
mongod soft as      unlimited
mongod hard as      unlimited
mongod soft nofile  64000
mongod hard nofile  64000
mongod soft rss     unlimited
mongod hard rss     unlimited
mongod soft nproc   64000
mongod hard nproc   64000
mongod soft memlock unlimited
mongod hard memlock unlimited

Restart the server but still have this warning when execute “mongo” command :

2020-10-31T17:36:49.240+01:00: Soft rlimits too low
2020-10-31T17:36:49.240+01:00: currentValue: 4096
2020-10-31T17:36:49.240+01:00: recommendedMinimum: 64000

I scoured all the forums with Google search and try multiple solutions but still have this warning.

Does anyone have an idea?

Thank you!


Some forums suggesting reboot of system to effect the changes

Welcome to the community @Christophe_QUEVAL!

Can you confirm the command line you are running to restart the server? For example, are you using sudo systemctl start mongod (systemd) as suggested in Install MongoDB Community Edition on Red Hat or CentOS?

It looks like you have followed the instructions to create a seperate nproc configuration from the UNIX ulimit Settings page. If you are using the default systemd installation, you can also specify resource limits within the [Service] sections of service scripts.


Yes already done, but no changes…