# Issue with open files

**URL:** <https://discuss.elastic.co/t/issue-with-open-files/239300>\
**Category:** Elasticsearch\
**Created:** [June 30, 2020, 12:47pm UTC](https://discuss.elastic.co/t/issue-with-open-files/239300 "2020-06-30T12:47:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WiseOwl](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@WiseOwl](https://discuss.elastic.co/u/WiseOwl)\
**Post date:** [June 30, 2020, 12:47pm UTC](https://discuss.elastic.co/t/issue-with-open-files/239300/1 "2020-06-30T12:47:36Z")

</div>

Hi All,

I have an issue with a cluster setup. The setup has 3 nodes, all communicating via stunnel ( as per [https://www.elastic.co/guide/en/cloud/current/ec-tunneling-ssl.html](https://www.elastic.co/guide/en/cloud/current/ec-tunneling-ssl.html) ).  
However, the link is flaky from time to time, leading to a disconnect.  
The link is down for 1-10 seconds at most, and syncing continues afterwards.

However, during this period it seems like the 'transactionlog' files are not closed properly.  
Seeing as the disconnects are quite frequent this leads to a LOT of open files by elasticsearch ( all transactionlog files ) causing it to crash when it hits the ulimit.

The weird thing is, the cluster health stays at 100% all the time, not complaining about missing data or the likes.

Is there a way to have elasticsearch clean up these open files from time to time?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![nhat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nhat/32/22170_2.png) [@nhat](https://discuss.elastic.co/u/nhat)\
**Post date:** [July 6, 2020, 7:44pm UTC](https://discuss.elastic.co/t/issue-with-open-files/239300/2 "2020-07-06T19:44:28Z")

</div>

@WiseOwl Which Elasticsearch version are you using?

---

<div class="post-metadata">

**Author:** ![WiseOwl](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@WiseOwl](https://discuss.elastic.co/u/WiseOwl)\
**Post date:** [July 8, 2020, 8:11am UTC](https://discuss.elastic.co/t/issue-with-open-files/239300/3 "2020-07-08T08:11:39Z")

</div>

Hi Nhat,

All nodes are running:

```auto
  "version" : {
    "number" : "7.5.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "e9ccaed468e2fac2275a3761849cbee64b39519f",
    "build_date" : "2019-11-26T01:06:52.518245Z",
    "build_snapshot" : false,
    "lucene_version" : "8.3.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },

```

---

<div class="post-metadata">

**Author:** ![nhat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nhat/32/22170_2.png) [@nhat](https://discuss.elastic.co/u/nhat)\
**Post date:** [July 8, 2020, 1:58pm UTC](https://discuss.elastic.co/t/issue-with-open-files/239300/4 "2020-07-08T13:58:40Z")

</div>

Hi @WiseOwl, I think you hit the issue described in [https://github.com/elastic/elasticsearch/issues/49970](https://github.com/elastic/elasticsearch/issues/49970). That bug was fixed in Elasticsearch 7.7.

---

<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:** [August 5, 2020, 1:58pm UTC](https://discuss.elastic.co/t/issue-with-open-files/239300/5 "2020-08-05T13:58:48Z")

</div>

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