Too many open files http://dev.libresource.org/home/development/roadmap/lsc1-5/a0ef0d6bc0a8001e003f45472216ac9e Comment of : Too many open files http://dev.libresource.org/home/development/roadmap/lsc1-5/a0ef0d6bc0a8001e003f45472216ac9e/feeaf99fc0a8001e013c8f2fa3f0fadb Guest 2006-01-11T12:23:38+01:00 http://www.jivesoftware.com/jive/entry.jspa?externalID=171&categoryID=2 ):

the following is an example of how to do this for RedHat Linux 7.3. The following is an example of the output of

ulimit -aH

You can see that the current shell (and its children) is restricted to 1024 open file descriptors.

invalid link : root@host /(Illegal character in path at index 9: root@host /)# ulimit -aH

core file size (blocks) unlimited data seg size (kbytes) unlimited file size (blocks) unlimited max locked memory (kbytes) unlimited max memory size (kbytes) unlimited open files 1024 pipe size (512 bytes) 8 stack size (kbytes) unlimited cpu time (seconds) unlimited max user processes 4094 virtual memory (kbytes) unlimited

The file descriptor limit can be increased using the following procedure:

  1. Edit /etc/security/limits.conf and add the lines:
  • soft nofile 1024
  • hard nofile 65535
2. Edit /etc/pam.d/login, adding the line:

session required /lib/security/pam_limits.so

3. The system-wide file descriptor limit is set in /proc/sys/fs/file-max. The following command will increase the limit to 65535:

echo 65535 > /proc/sys/fs/file-max

4. Finally, increase the file descriptor limits using:

ulimit -n 8192

5. You may also have to update /etc/sysctl.conf and add/change the fs.file-max setting to:

  1. Set the maximum number of open files
fs.file-max=65535

Note that you may need to log out and back in again before the changes take effect.]]> Comment of : Too many open files http://dev.libresource.org/home/development/roadmap/lsc1-5/a0ef0d6bc0a8001e003f45472216ac9e/ceb40f03c0a8001e01c7737143c0a4fe Florent Jouille 2006-01-11T12:23:38+01:00 Maybe can i help you if you give me the complete trace of the error…]]> Comment of : Too many open files http://dev.libresource.org/home/development/roadmap/lsc1-5/a0ef0d6bc0a8001e003f45472216ac9e/99e352edc0a8001e016601d9b0f6a130 Sebastien Jourdain 2006-01-11T12:23:38+01:00

Caused by: java.io.FileNotFoundException: /data/libresource/shared2/index/_9rw.fdx (Too many open files)
	at java.io.RandomAccessFile.open(Native Method)
	at java.io.RandomAccessFile.(RandomAccessFile.java:204)
	at org.apache.lucene.store.FSInputStream$Descriptor.(FSDirectory.java:389)
	at org.apache.lucene.store.FSInputStream.(FSDirectory.java:418)
	at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:291)
	at org.apache.lucene.index.FieldsReader.(FieldsReader.java:80)
	at org.apache.lucene.index.SegmentReader.(SegmentReader.java:139)
	at org.apache.lucene.index.SegmentReader.(SegmentReader.java:120)
	at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:122)
	at org.apache.lucene.store.Lock$With.run(Lock.java:148)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
	at courgette.search.CourgetteSearch.search(CourgetteSearch.java:149)
]]>