# Client seems to block/hang when server hangs - v0.18.7

**URL:** <https://discuss.elastic.co/t/client-seems-to-block-hang-when-server-hangs-v0-18-7/6543>\
**Category:** Elasticsearch\
**Created:** [January 30, 2012, 6:38pm UTC](https://discuss.elastic.co/t/client-seems-to-block-hang-when-server-hangs-v0-18-7/6543 "2012-01-30T18:38:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hillmlogica](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@hillmlogica](https://discuss.elastic.co/u/hillmlogica)\
**Post date:** [January 30, 2012, 6:38pm UTC](https://discuss.elastic.co/t/client-seems-to-block-hang-when-server-hangs-v0-18-7/6543/1 "2012-01-30T18:38:52Z")

</div>

Hi,

We're seeing a problem with elastic Transport Clients hang. Can anyone  
see what we're doing wrong?

We're running Elastic v0.18.7 in with a cluster of 3 elastic nodes on  
jdk1.7.0\_02 on windows 2003 64-bit servers.

We are sometimes getting an operating system problem which hangs one  
of the elastic nodes. When this happens, the cluster behaves perfectly  
well and rebalances as expected.

Unfortunately we still have a problem in the connected clients. The  
calls into the elastic client appear to hang. We've created a gist  
here [https://gist.github.com/1705716](https://gist.github.com/1705716) with 2 thread dumps attached. In  
it you can see the problem getting worse - look at  
"buckeroo.indexing.ElasticSearchClient.healthiness" calls. There are  
41 in the first dump, then 56 in the second thread dump. We have set a  
10 second timeout on these calls but this is not being triggered.

The snippet where we create the client is:

```
    TransportClient transportClient = new TransportClient(
        settingsBuilder()
            .put("cluster.name", clusterName.value)
            .put("client.transport.sniff", true)
            .build());
    for (HostAndPort hostAndPort : hostAndPorts) {
        transportClient.addTransportAddress(new

```

InetSocketTransportAddress(hostAndPort.host.value, hostAndPort.port));  
}

thanks in advance for any help  
-- mike

---

<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 30, 2012, 8:08pm UTC](https://discuss.elastic.co/t/client-seems-to-block-hang-when-server-hangs-v0-18-7/6543/2 "2012-01-30T20:08:31Z")

</div>

Agreed, we can do better to try and handle this case with transport client (node freezes and seems to not response at all). Opened an issue: [Transport Client: Improve remote node freeze handling by adding another timeout layer · Issue #1653 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1653).

On Monday, January 30, 2012 at 8:38 PM, Mike Hill wrote:

> Hi,
> 
> We're seeing a problem with elastic Transport Clients hang. Can anyone  
> see what we're doing wrong?
> 
> We're running Elastic v0.18.7 in with a cluster of 3 elastic nodes on  
> jdk1.7.0\_02 on windows 2003 64-bit servers.
> 
> We are sometimes getting an operating system problem which hangs one  
> of the elastic nodes. When this happens, the cluster behaves perfectly  
> well and rebalances as expected.
> 
> Unfortunately we still have a problem in the connected clients. The  
> calls into the elastic client appear to hang. We've created a gist  
> here [elastic client hang · GitHub](https://gist.github.com/1705716) with 2 thread dumps attached. In  
> it you can see the problem getting worse - look at  
> "buckeroo.indexing.ElasticSearchClient.healthiness" calls. There are  
> 41 in the first dump, then 56 in the second thread dump. We have set a  
> 10 second timeout on these calls but this is not being triggered.
> 
> The snippet where we create the client is:
> 
> TransportClient transportClient = new TransportClient(  
> settingsBuilder()  
> .put("cluster.name ([http://cluster.name](http://cluster.name))", clusterName.value)  
> .put("client.transport.sniff", true)  
> .build());  
> for (HostAndPort hostAndPort : hostAndPorts) {  
> transportClient.addTransportAddress(new  
> InetSocketTransportAddress(hostAndPort.host.value, hostAndPort.port));  
> }
> 
> thanks in advance for any help  
> -- mike

---

<div class="post-metadata">

**Author:** ![hillmlogica](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@hillmlogica](https://discuss.elastic.co/u/hillmlogica)\
**Post date:** [January 30, 2012, 8:42pm UTC](https://discuss.elastic.co/t/client-seems-to-block-hang-when-server-hangs-v0-18-7/6543/3 "2012-01-30T20:42:01Z")

</div>

Hi Shay

thanks, that'd be great

-- mike

On Mon, Jan 30, 2012 at 8:08 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Agreed, we can do better to try and handle this case with transport  
> client (node freezes and seems to not response at all). Opened an issue:  
> [Transport Client: Improve remote node freeze handling by adding another timeout layer · Issue #1653 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1653).

---

<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:41am UTC](https://discuss.elastic.co/t/client-seems-to-block-hang-when-server-hangs-v0-18-7/6543/4 "2017-07-06T03:41:02Z")

</div>


