lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Too many open files
Date Fri, 02 Jan 2009 20:00:14 GMT
Nuno,

Check towards the end of this article: http://www.onjava.com/pub/a/onjava/2003/03/05/lucene.html

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Nuno Seco <nseco@dei.uc.pt>
> To: java-dev@lucene.apache.org
> Sent: Friday, January 2, 2009 12:53:14 PM
> Subject: Too many open files
> 
> Hello.
> 
> I'm struggling with the following exception:
> 
> Exception in thread "Lucene Merge Thread #1037" 
> org.apache.lucene.index.MergePolicy$MergeException: 
> java.io.FileNotFoundException: 
> /home/plopes/aktwise/server-commons/data/lucenedata/_80c.tii (Too many open 
> files)
>   at 
> org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeException(ConcurrentMergeScheduler.java:309)

> 
>   at 
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:286)

> 
> Caused by: java.io.FileNotFoundException: 
> /home/plopes/aktwise/server-commons/data/lucenedata/_80c.tii (Too many open 
> files)
> 
> 
> I have only one indexwriter instantiated, and every time i update the index (add 
> or remove a document), i commit the indexwriter and run the following code in 
> order to make the searcher aware of the new documents:
> 
> private synchronized void refreshSearcher() throws CorruptIndexException, 
> IOException
>   {
>       try
>       {
>           IndexReader reader = searcher.getIndexReader().reopen();              
>                     searcher.close();
>           searcher = new IndexSearcher(reader);
> 
>           if (reader != searcher.getIndexReader())
>               searcher.getIndexReader().close();                             }
>       catch (Exception e)
>       {
>           e.printStackTrace();
>       }
> 
>   }
> 
> 
> I have tried lowering the merge factor and the number of threads by executing 
> the following:
> ((ConcurrentMergeScheduler)writer.getMergeScheduler()).setMaxThreadCount(1); 
> writer.setMergeFactor(3);
> 
> 
> I am using lucene 2.4.0 and there is only one thread manipulating the index.
> 
> any help would be appreciated.
> 
> Nuno Seco
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message