Searchkick with ElasticSearch returns “Faraday::ConnectionFailed: execution expired”

前端 未结 3 931
粉色の甜心
粉色の甜心 2021-01-21 03:36

I\'ve been using the searchkick gem with elasticsearch with no problems on a Rails 4.2.0 application. I have a single Video model using searchkick.

For some reason

3条回答
  •  逝去的感伤
    2021-01-21 04:09

    Typically after hours of struggling I found the answer minutes after posting the question...

    As per https://github.com/ankane/searchkick/issues/382 I added an initializer with:

    Searchkick.client = Elasticsearch::Client.new(hosts: ["localhost:9200"], retry_on_failure: true, transport_options: {request: {timeout: 250}})
    

    which seems to have solved the problem. I'll report back if it recurs.

提交回复
热议问题