# Avoid "Too many open files" when running ES on Windows OS

**URL:** <https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304>\
**Category:** Elasticsearch\
**Created:** [October 15, 2015, 5:25pm UTC](https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304 "2015-10-15T17:25:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![normansoth](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@normansoth](https://discuss.elastic.co/u/normansoth)\
**Post date:** [October 15, 2015, 5:25pm UTC](https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304/1 "2015-10-15T17:25:25Z")

</div>

Hello,

By default any Windows OS has a limit of Maximum open files per session set to 16384 (run from a command prompt : net config server)

I know that when running ES on Linux you can have in certain case an issue where the system logs "Too many open files".

To fix this the command ulimit is available.

I wanted to know if there is a way to change this value on Windows server because I didn't find any information regarding this.

Many thanks for your help.

Regards,

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 15, 2015, 5:34pm UTC](https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304/2 "2015-10-15T17:34:16Z")

</div>

> By default any Windows OS has a limit of Maximum open files per session set to 16384 (run from a command prompt : net config server)

AFAIK this doesn't apply to local files. See [Archived MSDN and TechNet Blogs | Microsoft Learn](http://blogs.technet.com/b/markrussinovich/archive/2009/09/29/3283844.aspx).

---

<div class="post-metadata">

**Author:** ![normansoth](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@normansoth](https://discuss.elastic.co/u/normansoth)\
**Post date:** [October 15, 2015, 6:43pm UTC](https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304/3 "2015-10-15T18:43:10Z")

</div>

Thanks.

Sounds to me like a big limitation of using ES on Windows OS...

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 15, 2015, 6:57pm UTC](https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304/4 "2015-10-15T18:57:14Z")

</div>

If there is a 16k limit on open files it would indeed be a limitation, but as I said I don't think that's true. That said, there could be limits in runtime libraries so the behavior could be JVM-dependent.

---

<div class="post-metadata">

**Author:** ![normansoth](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@normansoth](https://discuss.elastic.co/u/normansoth)\
**Post date:** [October 16, 2015, 7:47am UTC](https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304/5 "2015-10-16T07:47:49Z")

</div>

have the same kind of limitation in Linux but it is easier to extend the limit using ulimit command:

> <https://github.com/elastic/elasticsearch/issues/3183>

---

<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:** [July 5, 2017, 11:44pm UTC](https://discuss.elastic.co/t/avoid-too-many-open-files-when-running-es-on-windows-os/32304/6 "2017-07-05T23:44:25Z")

</div>


