Request timeout on mget?

Can mget requests in realtime mode timeout? Specifically, I'm curious if mget requests via the official Python client can timeout.

Hi @loren,

Yes it can timeout. For example if I use netcat to simulate elasticsearch:

$ nc -l 9200

Then execute this mget using elasticsearchpy client:

from elasticsearch import Elasticsearch

es = Elasticsearch()

print es.mget(body={
 "docs": [
 {
     "_index": "test",
     "_type": "type",
     "_id": "1"
   },
   {
     "_index": "test",
     "_type": "type",
     "_id": "2"
   }
 ]
}, realtime=True)

You will see the default 10 seconds ConnectionTimeout happening.

Cheers,
LG

You just saved my whole life @luiz.santos. Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.