I am using lucene for indexing the files and then these indexes are used to search/update or delete records in files.Apart from that whenever a new record is created in database it also triggers the creation of the record in lucene based file index system.
Compass core APi is used for interaction with lucene.
This worked fine in development and QA environments but failed in production with the error that "Too many files open".
This caused our server to hang.
These are the details of the environment that we are working with.
Server Tomcat 5.5.16
OS Linux
Lucene core API version 2.2
Compass core API revision 1.2.1
The compass core parameters used for lucene are
merge factor 8000 (this was changed to 200 later on but the error still existed)
lock timeout 200 secs
optimizer.schedule was set to true
schedule.period to 200 secs
and commitBeforeCompletion is set to true
As a part of initial anlysis we found out that at the time when this error occured the number of open files on the Linux box were 31k which is fairly large number. I feel the problem has to be with lucene rather than other applications deployed on the box coz once we stopped the application that was using lucene evrything worked out smoothly.
If anyone has ever encountered any such issues please let me know how you debugged the actual issue and the steps you took to resolve them.
Rgds
Ramraj