3
votes

When I start elasticseach, I am getting this Warning:

[2018-08-05T15:04:27,370][WARN ][o.e.b.BootstrapChecks    ] [bDyfvVI] max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

I have set the needed value to 65536 as running through this tutorial https://www.elastic.co/guide/en/elasticsearch/reference/current/file-descriptors.html. I have also tried these steps:

Check ulimit -n, it would be 4096.

Edit /etc/security/limits.conf and add following lines:

*    soft nofile 65536

*    hard nofile 65536

root soft nofile 65536

root hard nofile 65536
Edit /etc/pam.d/common-session and add this line session required pam_limits.so
Edit /etc/pam.d/common-session-noninteractive and add this line session required pam_limits.so
Reload session and check for ulimit -n, it would be 65536.

Unfortunately I am still getting this warning. Can someone help me why?

1
Did you find the solution on this?Pankaj Saboo

1 Answers

-3
votes

We've raised the MAX_OPEN_FILES set to 1024000 by changing the value in /etc/default/elasticsearch

More information here: https://www.elastic.co/guide/en/elasticsearch/reference/current/file-descriptors.html

Elasticsearch uses a lot of file descriptors or file handles. Running out of file descriptors can be disastrous and will most probably lead to data loss. Make sure to increase the limit on the number of open files descriptors for the user running Elasticsearch to 65,536 or higher.

For the .zip and .tar.gz packages, set ulimit -n 65535 as root before starting Elasticsearch, or set nofile to 65535 in /etc/security/limits.conf.

On macOS, you must also pass the JVM option -XX:-MaxFDLimit to Elasticsearch in order for it to make use of the higher file descriptor limit.

RPM and Debian packages already default the maximum number of file descriptors to 65535 and do not require further configuration.

You can check the max_file_descriptors configured for each node using the Nodes Stats API, with:

GET _nodes/stats/process?filter_path=**.max_file_descriptors