Mongod max processes

If you encounter a problem with MongoDB with the below error. Its worth checking that your Linux OS does not have an override for your sysctl.conf settings called etc/security/limits.d/90-nproc.conf


[initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable
[initandlisten] can’t create new thread, closing connection


Add a new conf file after with the updated details in the /etc/security/limits.d/ folder entitled 91.mongod.conf. Ensure that the number is after the previous conf file to ensure it gets loaded last.

Example contents

root - nofile 21000
mongod - nofile 21000
mongod soft nproc 62848
mongod hard nproc 62848


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s