# Need elasticsearch to timeout early when service is down rather than waiting for 10secs and throw connection error

**URL:** <https://discuss.elastic.co/t/need-elasticsearch-to-timeout-early-when-service-is-down-rather-than-waiting-for-10secs-and-throw-connection-error/171313>\
**Category:** Elasticsearch\
**Created:** [March 7, 2019, 1:39pm UTC](https://discuss.elastic.co/t/need-elasticsearch-to-timeout-early-when-service-is-down-rather-than-waiting-for-10secs-and-throw-connection-error/171313 "2019-03-07T13:39:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaibhavnegi](https://avatars.discourse-cdn.com/v4/letter/v/fbc32d/32.png) [@vaibhavnegi](https://discuss.elastic.co/u/vaibhavnegi)\
**Post date:** [March 7, 2019, 1:39pm UTC](https://discuss.elastic.co/t/need-elasticsearch-to-timeout-early-when-service-is-down-rather-than-waiting-for-10secs-and-throw-connection-error/171313/1 "2019-03-07T13:39:57Z")

</div>

I am deleting a document in elasticsearch. When elasticsearch service is not running, it throws connection error but takes about 10 secs. Can i specify connection timeout to timeout within 1 sec ?  
timeout param does not work in this case

---

<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:** [April 4, 2019, 1:40pm UTC](https://discuss.elastic.co/t/need-elasticsearch-to-timeout-early-when-service-is-down-rather-than-waiting-for-10secs-and-throw-connection-error/171313/2 "2019-04-04T13:40:03Z")

</div>

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