Skip to main content
obucaojit
Bronze ⭐️⭐️⭐️
March 25, 2017

How to fix Ambari-Infra (Solr) throwing 'OutOfMemoryError: unable to create new native thread'

  • October 5, 2026 at 9:26 AM
  • 0 replies
  • 2165 views
  • Translate All

Symptom:

After adding additional configurations to Solr, the service fails with both 'no servers hosting shard' and 'OutOfMemoryError' errors. A restart will resolve the issue for some time and it will eventually hit the error again.

Root Cause:

In some versions, the default setting for max user processes for the infra-solr user is 1024, which may be set too low for certain use cases.

Resolution:

Increase the max user process user limit.

This can be done by creating the file /etc/security/limits.d/infra-solr.conf on the solr node and setting the nproc property.

For example if the new value chosen is 6000, the contents would be:

infra-solr - nproc 6000