Solved Solr: Too many open files

Solved Solr Issue: FileNotFoundException : Too many open files
While running crawl using SOLR I ran into this issue where “Too Many Open Files” message appears in the logs.
Environment:
Linux: CentOS 4.5
Solr: 1.3
Tomcat: 6.0.10
Somehow this problem seems to be related number of file descriptors allotted to users on Linux system. You can check that by using command
ulimit -n
To change this settings:

  • Login as root
  • Edit /etc/security/limits.conf
  • Add the following entry
    “USERNAME” soft nofile 4096
    “USERNAME” hard nofile 32768

You are done 🙂