# Exception "Underlying connection was closed" elasticsearch

**URL:** <https://discuss.elastic.co/t/exception-underlying-connection-was-closed-elasticsearch/67802>\
**Category:** Elasticsearch\
**Created:** [December 1, 2016, 8:01pm UTC](https://discuss.elastic.co/t/exception-underlying-connection-was-closed-elasticsearch/67802 "2016-12-01T20:01:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhan](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@madhan](https://discuss.elastic.co/u/madhan)\
**Post date:** [December 1, 2016, 8:01pm UTC](https://discuss.elastic.co/t/exception-underlying-connection-was-closed-elasticsearch/67802/1 "2016-12-01T20:01:06Z")

</div>

Failed after retrying 100 times: 'POST testsearch/\_search'.

**"The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."**

if i query more than 1000 docs it throws above exception.

I don't know what went wrong?

---

<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:** [December 29, 2016, 8:01pm UTC](https://discuss.elastic.co/t/exception-underlying-connection-was-closed-elasticsearch/67802/2 "2016-12-29T20:01:22Z")

</div>

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