From: Francois-Xavier P. <fra...@ca...> - 2008-03-26 17:10:52
|
Hi all, after some more tests with Sylvain on that "java.io.FileNotFoundException" we could reproduce the problem on both 2.0.3 and trunk when stressing GeoNetwork (on linux, tomcat or jetty at least). Problem occurs when too many search are made by lucene (you could try to use apachebench "ab" to stress the app). Lucene opens index files but not close thoses files in some cases. When the number of files opened by the java process reach the system limit (ulimit -a), IOException occurs. As said by Renaud, on option could be to increase the ulimit (see Lucene FAQ also) http://wiki.apache.org/lucene-java/LuceneFAQ#head-48921635adf2c968f7936dc07d51dfb40d638b82 Another (and better) option is to close the IndexSearcher/Reader in LuceneSearcher once search ended. A comment on the close method in LuceneSearcher said "RGFIX: check this" and close only the reader. It looks like it's better to close both searcher and reader once the search is done. Then the session use only the hits element. Any comments on that? Applying the patch attached will solve the problem. If that sounds good to everyone, it could be applied for 2.3 as not so many users seem to face the problem for the time being ? Ciao. Francois PS: Thanks a lot to Sylvain for his help on tracking/solving that bug ... |