The "Too many open files" issue while Lucene is searching
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rossen_angelov
Posted On:   Friday, February 25, 2005 09:39 AM

I'm getting a lot of "Too many files open" exceptions during regular searching. Lucene is not indexing at that time and the optimization has been completed too. The file descriptors limit is set to 1024 and I can't increase it. I noticed that every search opens a increases the number of open files with one. The name reference of that file points to the corresponding index file. These opened file never close until Lucene is restarted, the process dies and a new one is started. Is this behavior normal for Lucene? Is there any other solution to close all these open files besides restarting Lucene (killing the Java process that runs the Lucene related code)?    More>>

I'm getting a lot of "Too many files open" exceptions during regular searching. Lucene is not indexing at that time and the optimization has been completed too.



The file descriptors limit is set to 1024 and I can't increase it.



I noticed that every search opens a increases the number of open files with one. The name reference of that file points to the corresponding index file.



These opened file never close until Lucene is restarted, the process dies and a new one is started.



Is this behavior normal for Lucene?
Is there any other solution to close all these open files besides restarting Lucene (killing the Java process that runs the Lucene related code)?



Thanks,

Ross

   <<Less

Re: The "Too many open files" issue while Lucene is searching

Posted By:   Richard_Krenek  
Posted On:   Tuesday, March 15, 2005 01:24 PM

I am very new to Lucene (just 2 weeks now) but are you creating a Searcher each time you do a query without closing it? That is just a random guess but might be a starting point.

Re: The "Too many open files" issue while Lucene is searching

Posted By:   Otis_Gospodnetic  
Posted On:   Saturday, February 26, 2005 10:06 AM

You can switch to the compound index format, which will minimize the number of open file descriptors used.
However, it sounds like your application may be doing something funky - are you reusing your IndexSearcher? You should. That way Lucene will not be using more and more open file descriptors.
About | Sitemap | Contact