Home:ALL Converter>Zend_Search_Lucene crashes during indexing

Zend_Search_Lucene crashes during indexing

Ask Time:2009-04-28T20:12:01         Author:pbrodka

Json Formatter

I wanted to create search engine for my webpage, but during indexing on server it crashes with errors :

Warning: opendir(/admin/lucene/) [function.opendir]: failed to open dir: Too many     open files in /admin/includes/Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 159

Warning: readdir(): supplied argument is not a valid Directory resource in /admin/includes/Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 160

Warning: closedir(): supplied argument is not a valid Directory resource in /admin/includes/Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 167

Fatal error: Ignoring exception from Zend_Search_Lucene_Proxy::__destruct() while an exception is already active (Uncaught Zend_Search_Lucene_Exception in /admin/includes/Zend/Search/Lucene/Storage/File/Filesystem.php on line 66) in /admin/test.php on line 549

I am using newest version of ZF. Is there code solution for such error - I run script on localhost and it works great.

Thanks for any help.

Author:pbrodka,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/797570/zend-search-lucene-crashes-during-indexing
Alexander Veremyev :

It seems the problem is in the large number of segments in the index.\n\nCould you check how much files does index folder contain?\n\nThere are two ways to solve this problem:\na) Optimize index more often.\nb) Use another MaxBufferedDocs/MergeFactor parameters. See Zend_Search_Lucene documentation for details.\n\nIf it doesn't help, please register JIRA issue for the problem.",
2009-04-28T18:30:31
ewanm89 :

PHP has hit the limit on the number of files it can have open at once it seems might be an option to change in php.ini, could be an OS (quota) limit or you might be able to tell the indexer to slow down and not have so many files open simultaneously.",
2009-04-28T12:20:38
yy