# \[kibana\] Socket hang up, unable to revive connection

**URL:** <https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950>\
**Category:** Kibana\
**Created:** [September 18, 2019, 8:32am UTC](https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950 "2019-09-18T08:32:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![soulou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soulou/32/54383_2.png) [@soulou](https://discuss.elastic.co/u/soulou)\
**Post date:** [September 18, 2019, 8:32am UTC](https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950/1 "2019-09-18T08:32:41Z")

</div>

I'm opening this ticket as a followup of this one.

> [@Socket hang up kibana](https://discuss.elastic.co/t/socket-hang-up-kibana/135591/8):
>
> @Brandon_Kobel Yes, we do have a load balancer in-front of Elasticsearch. We can navigate each page in kibana but kibana is not showing any results. Every time we need to restart kibana and when we restart it, it works fine utill another socket hang up error occurs.

I'm experiencing exactly the same behavior.

- At some point connections failed (socket hangup, unable to revive connection, no living connection)
- Restarting kibana makes it work again.
- Elasticsearch 3 nodes cluster is all green no special logs in it.

Yes there is a HAProxy in front of my Elasticsearch cluster, with an idle timeout of 1h. I assume this is the problem here.

Is there a way to configure kibana via elasticsearch.js to handle this properly?

Regards,

-- Léo

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [September 18, 2019, 1:08pm UTC](https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950/2 "2019-09-18T13:08:46Z")

</div>

> [@soulou](#):
>
> Yes there is a HAProxy in front of my Elasticsearch cluster, with an idle timeout of 1h. I assume this is the problem here.

Can you clarify what "idle timeout" is? I'm not terribly familiar with HAProxy.

What is your ["timeout server"](https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-timeout%20server) set to? I believe you'll want to make sure this is set to something at least as large as your `elasticsearch.requestTimeout` setting within `kibana.yml`. This defaults to `30000` (30 seconds), so we'll want to ensure that HAProxy allows Elasticsearch at least that long to respond to requests.

---

<div class="post-metadata">

**Author:** ![soulou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soulou/32/54383_2.png) [@soulou](https://discuss.elastic.co/u/soulou)\
**Post date:** [September 19, 2019, 8:16am UTC](https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950/3 "2019-09-19T08:16:33Z")

</div>

Hi Larry Gregory, thanks a lot for your answer.

Sorry for using idle timeout it wasn't accurate and plus, the value was wrong: the current configuration is:

```auto
    timeout connect 10s
    timeout client 1m
    timeout server 2m
    timeout check 5s
    timeout http-request 5s

```

So the timeout server is 2 minutes, while requestTimeout of kibana is at 30 seconds.

But I had this feeling that then connection is not close but put back in a pool, and a bit later kibana reused it but haproxy closed it as nothing went through the pipe. Does it sound possible to you?

Regards,

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [September 19, 2019, 12:27pm UTC](https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950/4 "2019-09-19T12:27:17Z")

</div>

Thanks for the clarification.

> [@soulou](#):
>
> timeout http-request 5s

This one looks suspicious to me...can you increase this to 2m and see if that helps?

---

<div class="post-metadata">

**Author:** ![soulou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soulou/32/54383_2.png) [@soulou](https://discuss.elastic.co/u/soulou)\
**Post date:** [September 19, 2019, 1:00pm UTC](https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950/5 "2019-09-19T13:00:35Z")

</div>

Ok we're going to try this and I'll come back to you. From what I got the http-request timeout aims at ensuring no client open connections but don't send any request data. But maybe it leads to some issues with http keepalive elasticsearch.js seems to use.

---

<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:** [October 17, 2019, 1:01pm UTC](https://discuss.elastic.co/t/kibana-socket-hang-up-unable-to-revive-connection/199950/6 "2019-10-17T13:01:13Z")

</div>

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