# Do i need to close client everytime I finish querying?

**URL:** <https://discuss.elastic.co/t/do-i-need-to-close-client-everytime-i-finish-querying/207832>\
**Category:** Elasticsearch\
**Created:** [November 14, 2019, 7:59am UTC](https://discuss.elastic.co/t/do-i-need-to-close-client-everytime-i-finish-querying/207832 "2019-11-14T07:59:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjsjyh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjsjyh/32/59845_2.png) [@cjsjyh](https://discuss.elastic.co/u/cjsjyh)\
**Post date:** [November 14, 2019, 7:59am UTC](https://discuss.elastic.co/t/do-i-need-to-close-client-everytime-i-finish-querying/207832/1 "2019-11-14T07:59:31Z")

</div>

Do I need to close connection that I made with  
`const elasticClient = new Client(parameters)`?  
or does elasticsearch handle by itself?

---

<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 12, 2019, 7:59am UTC](https://discuss.elastic.co/t/do-i-need-to-close-client-everytime-i-finish-querying/207832/2 "2019-12-12T07:59:33Z")

</div>

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