# Error about too many open files when allocating shard

**URL:** <https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055>\
**Category:** Elasticsearch\
**Created:** [April 14, 2018, 7:03pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055 "2018-04-14T19:03:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Warren\_Turner](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@Warren\_Turner](https://discuss.elastic.co/u/Warren_Turner)\
**Post date:** [April 14, 2018, 7:03pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055/1 "2018-04-14T19:03:48Z")

</div>

I opened a closed index with 5 shards. All of the shards allocated fine except 1. When I check the logs I see an error about too many open files.

```
[WARN][o.e.c.a.s.ShardStateAction] [bos1-es2] [px-web-server-2018.03.06][4] received shard failed for shard id [[px-web-server-2018.03.06][4]], allocation id [tVvJ\
ZJD4SGO2YVMiaA3K5g], primary term [0], message [failed recovery], failure [RecoveryFailedException[[px-web-server-2018.03.06][4]: Recovery failed on {bos1-es2}{8SjCHI-OQn-mBAl0OBLx6Q}{G0zKtNGHQjuWrhWcapfsHQ}{192.168.8.151}{192.168.8.151:9300}{ml.machine_memory=25147817984, ml.max_open_jobs=20, ml.enabled=true}]; nested: IndexShardRecoveryException[failed to recover from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: FileSystemException[/es_data1/nodes/0/indices/851HGssQQtGcuZRzUhkDpg/4/translog/translog-2593.ckp: Too many open files]; ]

```

I checked \_nodes/stats/process and it says that I have 65536 "max\_file\_descriptors" and "open\_file\_descriptors" is only 8271. What am I missing here?  
Thanks!

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 15, 2018, 8:20pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055/2 "2018-04-15T20:20:00Z")

</div>

What version of Elasticsearch is this (please: always include this information)?

---

<div class="post-metadata">

**Author:** ![Warren\_Turner](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@Warren\_Turner](https://discuss.elastic.co/u/Warren_Turner)\
**Post date:** [April 16, 2018, 2:26pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055/3 "2018-04-16T14:26:22Z")

</div>

Oops, this is 6.2.2

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 16, 2018, 2:54pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055/4 "2018-04-16T14:54:46Z")

</div>

I think that you've been bitten by an endless flush bug that will be fixed in 6.2.4: [https://github.com/elastic/elasticsearch/pull/29125](https://github.com/elastic/elasticsearch/pull/29125)

---

<div class="post-metadata">

**Author:** ![Warren\_Turner](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@Warren\_Turner](https://discuss.elastic.co/u/Warren_Turner)\
**Post date:** [April 16, 2018, 5:29pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055/5 "2018-04-16T17:29:07Z")

</div>

Ug, any idea when that will be released?

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 16, 2018, 6:11pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055/6 "2018-04-16T18:11:14Z")

</div>

I am really sorry but we do not provide release dates.

---

<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:** [May 14, 2018, 6:11pm UTC](https://discuss.elastic.co/t/error-about-too-many-open-files-when-allocating-shard/128055/7 "2018-05-14T18:11:18Z")

</div>

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