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

Error

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

Solution

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

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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