File Descriptors
This is only relevant for Linux and macOS and can be safely ignored if running Elasticsearch on Windows. On Windows that JVM uses an API limited only by available resources.
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,535 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:
resp = client.nodes.stats(
metric="process",
filter_path="**.max_file_descriptors",
)
print(resp) response = client.nodes.stats( metric: 'process', filter_path: '**.max_file_descriptors' ) puts response
const response = await client.nodes.stats({
metric: "process",
filter_path: "**.max_file_descriptors",
});
console.log(response); GET _nodes/stats/process?filter_path=**.max_file_descriptors
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/file-descriptors.html