How long does the connection object stay open in ES ?
Eg. For Python
es = elasticsearch.Elasticsearch([
{'host': 'localhost', 'port': 9200}
])
I have a web service that keeps running on production. Do I need to check
if the connection is open after x time ? say 24 hrs ?
How can I set it to run all the time ?
the connection is lazy so it will only be opened once you make a
request - just instantiating a client like this will not create any
connections.
Once a connection is created the python client will try to hold on to
it as long as possible (it uses urllib3 to do the connection pooling
itself) and reuse it. Even if it's closed you don't have to check and
it will automatically reopen.
How long does the connection object stay open in ES ?
Eg. For Python
es = elasticsearch.Elasticsearch([
{'host': 'localhost', 'port': 9200}
])
I have a web service that keeps running on production. Do I need to check if
the connection is open after x time ? say 24 hrs ?
How can I set it to run all the time ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.