Too many open files error

Hello,

Currently using elasticsearch 2.0 , had to create another user to run it since it cant run as root.

I have changed the settings for ulimit in the limits.conf file and also added the required lines in common-session file.

The ulimit for the user is updated but when I check the ulimit for elasticsearch's process id , it is not updated. I have also rebooted the server.

Is there a solution to this ? @s1monw @warkolm

Hi,

I would set /etc/security/limits.conf to something like:

elasticsearch      soft nofile 64000                                                                                                                                                                                                                     
elasticsearch       hard nofile 64000 

Then reboot your server(s) and when you type ulimit -a it should be now set to open files to 64000.

yeah, I have added that, the ulimit for the user has been updated, when i check ulimit it confirms that. but when i check Elasticsearch's process limits it is not updated

ulimit needs to be set every time before starting the process. So typically this is set in the init script. If you modify the Elasticsearch init script and add ulimit -a do you see this being set? If not then you should either modify /etc/sysconfig/elasticsearch if you're using the RPM. Or use /etc/security/limits.conf to modify this value.

Hello, thanks for the help, I solved the problem by adding

limit nofile 64000 64000

to elasticsearch's init script.