# Need help with Too many open files

**URL:** <https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388>\
**Category:** Elasticsearch\
**Created:** [May 27, 2015, 1:05pm UTC](https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388 "2015-05-27T13:05:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigfootxxl](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bigfootxxl](https://discuss.elastic.co/u/bigfootxxl)\
**Post date:** [May 27, 2015, 1:05pm UTC](https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388/1 "2015-05-27T13:05:49Z")

</div>

I have only one instance and now I get constant Too many open files errors:

my settings are:  
[root@server ~]# cat /proc/sys/fs/file-max  
512000  
[root@server ~]# ulimit -Hn  
131070  
[root@server ~]# ulimit -Sn  
131070  
[root@log1tln ~]# cat /usr/lib/sysctl.d/elasticsearch.conf  
vm.max\_map\_count=262144  
set.MAX\_OPEN\_FILES=131070

but all this has no effect, I still have 65535:  
[root@server ~]# curl [http://server:9200/\_nodes/process?pretty|grep](http://server:9200/_nodes/process?pretty%7Cgrep) max\_file\_descriptors  
"max\_file\_descriptors" : 65535,

how exactly can I increase the max\_file\_descriptors then?

---

<div class="post-metadata">

**Author:** ![bigfootxxl](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bigfootxxl](https://discuss.elastic.co/u/bigfootxxl)\
**Post date:** [May 27, 2015, 2:28pm UTC](https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388/2 "2015-05-27T14:28:35Z")

</div>

Guys! please help!!!! I want to go home, it's past the workday here already... but the damn server is not working :((  
I even found finally /etc/sysconfig/elasticsearch but changing the MAX\_OPEN\_FILES=131070 had also no effect...

I'm getting really desperate here 😕

When I launch it from command line with -Des.max-open-files=true it has 131070 but the damn service is not taking it.

---

<div class="post-metadata">

**Author:** ![bigfootxxl](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bigfootxxl](https://discuss.elastic.co/u/bigfootxxl)\
**Post date:** [May 27, 2015, 3:04pm UTC](https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388/3 "2015-05-27T15:04:55Z")

</div>

Got help from irc:  
/usr/lib/systemd/system/elasticsearch.service  
LimitNOFILE=131070

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 28, 2015, 7:20am UTC](https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388/4 "2015-05-28T07:20:36Z")

</div>

It sounds like systemd doesn't like how we set ulimit, so if we can get more information we can potentially raise a bug to get it fixed.

---

<div class="post-metadata">

**Author:** ![Ashis\_Parajuli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashis_parajuli/32/14061_2.png) [@Ashis\_Parajuli](https://discuss.elastic.co/u/Ashis_Parajuli)\
**Post date:** [December 31, 2016, 3:46am UTC](https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388/5 "2016-12-31T03:46:34Z")

</div>

reboot the system ,and hence changes will take effect

---

<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, 10:04pm UTC](https://discuss.elastic.co/t/need-help-with-too-many-open-files/1388/6 "2017-07-05T22:04:35Z")

</div>


