Need help with Too many open files

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 max_file_descriptors
"max_file_descriptors" : 65535,

how exactly can I increase the max_file_descriptors then?

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 :confused:

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

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

1 Like

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.

reboot the system ,and hence changes will take effect