Warning problem when mongodb starts
When starting mongodb, if the parameters of the configuration file are not adjusted, it will lead to errors and warnings at startup, so let's take a look at
The causes and Solutions of Common warnings
It is fine when starting mongodb, but there is a warning when connecting to mongod.
WARNING: soft rlimits too low. Rlimits set to 1024 processes, 32000 files
Open the log file and find the following:
2016-01-21T14:20:57.243+0800 I CONTROL [initandlisten] * * WARNING: soft rlimits too low. Rlimits set to 7822 processes, 65535 files. Number of processes should be at least 32767.5: 0.5 times number of files.
It should be said that our parameters are not adjusted properly, resulting in an insufficient number of processes in mongodb, so we can add the following to the configuration file / etc/security/limits.conf of mongodb
Mongod soft nofile 64000
Mongod hard nofile 64000
Mongod soft nproc 32000
Mongod hard nproc 32000
Then restart the service and you won't see the warning.