# Connection Timeout Settings for the Java Client

**URL:** <https://discuss.elastic.co/t/connection-timeout-settings-for-the-java-client/6432>\
**Category:** Elasticsearch\
**Created:** [January 18, 2012, 6:41pm UTC](https://discuss.elastic.co/t/connection-timeout-settings-for-the-java-client/6432 "2012-01-18T18:41:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish\_Pandit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manish_pandit/32/3000_2.png) [@Manish\_Pandit](https://discuss.elastic.co/u/Manish_Pandit)\
**Post date:** [January 18, 2012, 6:41pm UTC](https://discuss.elastic.co/t/connection-timeout-settings-for-the-java-client/6432/1 "2012-01-18T18:41:22Z")

</div>

We are running ElasticSearch with 4 nodes, and accessing it with the  
Java Client. Last night one of the nodes became unresponsive  
(basically curl to :9200/\_status froze). Other nodes were just fine. I  
was wondering if there is a way to set a connection timeout at the  
driver level - or configure the driver in a way where it can fail over  
under such situations. I am aware of the setTimeout in  
SearchRequestBuilder, but as far as I understand thats to control how  
long the actual search takes, not including the connection time.  
Please let me know - I appreciate your help!

-cheers,  
Manish

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 18, 2012, 9:28pm UTC](https://discuss.elastic.co/t/connection-timeout-settings-for-the-java-client/6432/2 "2012-01-18T21:28:55Z")

</div>

The node will be detected as unresponsive and removed (both when using  
TransportClient and NodeClient). The default connect timeout is 30 seconds.

On Wed, Jan 18, 2012 at 8:41 PM, Manish Pandit [pandit.manish@gmail.com](mailto:pandit.manish@gmail.com)wrote:

> We are running Elasticsearch with 4 nodes, and accessing it with the  
> Java Client. Last night one of the nodes became unresponsive  
> (basically curl to :9200/\_status froze). Other nodes were just fine. I  
> was wondering if there is a way to set a connection timeout at the  
> driver level - or configure the driver in a way where it can fail over  
> under such situations. I am aware of the setTimeout in  
> SearchRequestBuilder, but as far as I understand thats to control how  
> long the actual search takes, not including the connection time.  
> Please let me know - I appreciate your help!
> 
> -cheers,  
> Manish

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:42am UTC](https://discuss.elastic.co/t/connection-timeout-settings-for-the-java-client/6432/3 "2017-07-06T03:42:13Z")

</div>


