MongoDB "soft rlimits too low" on FreeBSD

1.2k views Asked by At

When opening up a mongo shell I noticed a message that says:

Server has startup warnings:
2016-09-06T12:07:03.001-0400 I CONTROL  [initandlisten]
2016-09-06T12:07:03.001-0400 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. 
rlimits set to 12186 processes, 234972 files.
Number of processes should be at least 117486 : 0.5 times number of files.

I have looked for solutions to this but all I've found is that you can ignore this message if it's a development sever.

But the problem is that this message is not on a development server and it appearing on my production system. Is this anything I should be worried about or can I ignore this warning message?

I'm using MongoDB shell version: 3.2.9 on FreeBSD 10.3-RELEASE-p7

1

There are 1 answers

0
Ángel Orosa Rodríguez On BEST ANSWER

You should change the limits for the process in /etc/security/limits.conf; and also, for the change to be persistent you have to edit de init script, for example, in Red Hat 7, the init script has the following line:

LimitNOFILE=64000

You have to add the next one:

LimitNPROC=32000

Then restart the service. I hope this helps.