• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug Elastic Search building cache ERROR

oloman

Active member
#1
When I try to rebuild search cache, I got this error at 1 Million posts:



Erreur Info
XenForo_Exception: Elasticsearch indexing failed for post-4213154 Elasticsearch error: IndexFailedEngineException[[fofoxen][2] Index failed for [post#4213154]]; nested: FileNotFoundException[/var/lib/elasticsearch/xenfofofo/nodes/0/indices/fofoxen/2/index/_ee.fdx (Too many open files)]; - library/XenES/Search/SourceHandler/ElasticSearch.php:716
Généré par: gribs67, il y a un instant
Trace de la pile
#0 /var/www/www/xenforo/library/XenES/Search/SourceHandler/ElasticSearch.php(748): XenES_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), false, 'Elasticsearch i...')
#1 /var/www/www/xenforo/library/XenES/Search/SourceHandler/ElasticSearch.php(58): XenES_Search_SourceHandler_ElasticSearch->_assertIndexSuccessful(Object(stdClass), 'post', 4213154)
#2 /var/www/www/xenforo/library/XenForo/Search/Indexer.php(44): XenES_Search_SourceHandler_ElasticSearch->insertIntoIndex('post', 4213154, '', 'c'est ok pour m...', 1332862071, 24002, 311753, Array)
#3 /var/www/www/xenforo/library/XenForo/Search/DataHandler/Post.php(51): XenForo_Search_Indexer->insertIntoIndex('post', 4213154, '', 'c'est ok pour m...', 1332862071, 24002, 311753, Array)
#4 /var/www/www/xenforo/library/XenForo/Search/DataHandler/Abstract.php(227): XenForo_Search_DataHandler_Post->_insertIntoIndex(Object(XenForo_Search_Indexer), Array, Array)
#5 /var/www/www/xenforo/library/XenForo/DataWriter/DiscussionMessage.php(688): XenForo_Search_DataHandler_Abstract->insertIntoIndex(Object(XenForo_Search_Indexer), Array, Array)
#6 /var/www/www/xenforo/library/XenForo/DataWriter/DiscussionMessage.php(667): XenForo_DataWriter_DiscussionMessage->_insertOrUpdateSearchIndex()
#7 /var/www/www/xenforo/library/XenForo/DataWriter/DiscussionMessage.php(523): XenForo_DataWriter_DiscussionMessage->_indexForSearch()
#8 /var/www/www/xenforo/library/XenForo/DataWriter.php(1385): XenForo_DataWriter_DiscussionMessage->_postSave()
#9 /var/www/www/xenforo/library/XenForo/ControllerPublic/Thread.php(504): XenForo_DataWriter->save()
#10 /var/www/www/xenforo/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_Thread->actionAddReply()
#11 /var/www/www/xenforo/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /var/www/www/xenforo/index.php(13): XenForo_FrontController->run()
#13 {main}
État de la demande
array(3) {
["url"] => string(122) "http://xxxxx/index.php?threads/formation-résine-nail-art-forme-avec-laurie83-en-alsace.311753/add-reply"
["_GET"] => array(1) {
["threads/formation-résine-nail-art-forme-avec-laurie83-en-alsace_311753/add-reply"] => string(0) ""
}
["_POST"] => array(8) {
["message_html"] => string(148) "<p>c'est ok pour moi j'ai chargé les photos sur le pc! la french avec un doigt rouge c'est moi aussi, la verte c'est marie hélène je crois :)</p>"
["_xfRelativeResolver"] => string(119) "http://xxxxx/index.php?threads/formation-résine-nail-art-forme-avec-laurie83-en-alsace.311753/page-8"
["attachment_hash"] => string(32) "ce6c1574550362877d7f958c532b9ba5"
["last_date"] => string(10) "1332858780"
["_xfToken"] => string(57) "24002,1332862015,8eb6867dcd8f3d17d8a2ce7769118c2e8d00b3fe"
["_xfRequestUri"] => string(93) "/index.php?threads/formation-r%C3%A9sine-nail-art-forme-avec-laurie83-en-alsace.311753/page-8"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
 

Slavik

XenForo moderator
Staff member
#2
This is a server configuration error not a Xenforo error.

Two things.

1) How many items are you indexing at once? If using more than the default, try setting it back to the 1000 and try re-indexing.

2) Note down what user the ES service is runing under, usually either root or elasticsearch

In SSH type

Code:
ulimit -Hn
and

Code:
ulimit -Sn
Note down the returned numbers.

Open up

Code:
/etc/security/limits.conf
Add replacing X with the user that is running elasticsearch.

Code:
X soft nofile 50000
X hard nofile 50000
Save, and exit.

In SSH type

Code:
ulimit -Hn
and

Code:
ulimit -Sn
Confirm the new open file limits have been increased.

Re-index.
 

dbembibre

Active member
#4
I follow this tutorial and set to 32000.
http://www.elasticsearch.org/tutorials/too-many-open-files/

I review the elasticsearch in /etc/init.d/elastisearch and have a property for set the ulimit that work fine
# Specify the number of open files ulimit for the above user
# recommended value: 32000
ULIMIT_N=50000

Code:
[root@back download]# curl -XGET 'http://localhost:9200/_nodes?process=true&pretty=true'
{
  "ok" : true,
  "cluster_name" : "elasticbmw",
  "nodes" : {
    "MA67sqTmQLSfGP8mGwwFcQ" : {
      "name" : "Fetter, Philip",
      "transport_address" : "inet[/192.168.128.35:9300]",
      "hostname" : "gominolas.bd.es",
      "version" : "0.90.1",
      "http_address" : "inet[/192.168.128.35:9200]",
      "process" : {
        "refresh_interval" : 1000,
        "id" : 10357,
        "max_file_descriptors" : 50000
      }
    }
  }
 
Last edited: