Hi, 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. Hope this helps, Honza On Tue, Nov 25, 2014 at 3:39 AM, Ap <usc90...@gmail.com> wrote: > > 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 ? > > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elasticsearch+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/56a244a0-d805-4c1c-a7b6-fa6b118404aa%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CABfdDio%3DCmPrCboffmwNeebOO-1iZH28zY%3DW2sW-x0SBwGiVyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.