pthread_create failed: errno:11 Resource temporarily unavailable

maximum number of open files 64000 maximum number of processes 64000

It is taking 50seconds to complete query.

How to allocate more sources?

  • I am managing several clusters, and even the biggest ones with external users do not even come close to needing 64k file descriptors. There is something seriously wrong elsewhere. Most likely, your application does not reuse connections, but you open them manually. You are aware of the fact that most drivers maintain a connection pool themselves? Before increasing the resources, I'd review the code. Nov 7, 2015 at 10:25
  • Thanks markus. The problem was in memory distribution. System is unable to allocate memory to one of mongodb threads as it is being used by some other process. Nov 9, 2015 at 8:53

1 Answer 1


Mostly because of memory utilization. Observed mongodb log and found that the same time at which pthread_create failed, other processes were consuming memory so no room for mongodb.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.