file-descriptors.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. [[file-descriptors]]
  2. === File Descriptors
  3. [NOTE]
  4. This is only relevant for Linux and macOS and can be safely ignored if running
  5. Elasticsearch on Windows. On Windows that JVM uses an
  6. https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx[API]
  7. limited only by available resources.
  8. Elasticsearch uses a lot of file descriptors or file handles. Running out of
  9. file descriptors can be disastrous and will most probably lead to data loss.
  10. Make sure to increase the limit on the number of open files descriptors for
  11. the user running Elasticsearch to 65,536 or higher.
  12. For the `.zip` and `.tar.gz` packages, set <<ulimit,`ulimit -n 65536`>> as
  13. root before starting Elasticsearch, or set `nofile` to `65536` in
  14. <<limits.conf,`/etc/security/limits.conf`>>.
  15. On macOS, you must also pass the JVM option `-XX:-MaxFDLimit`
  16. to Elasticsearch in order for it to make use of the higher file descriptor limit.
  17. RPM and Debian packages already default the maximum number of file
  18. descriptors to 65536 and do not require further configuration.
  19. You can check the `max_file_descriptors` configured for each node
  20. using the <<cluster-nodes-stats>> API, with:
  21. [source,js]
  22. --------------------------------------------------
  23. GET _nodes/stats/process?filter_path=**.max_file_descriptors
  24. --------------------------------------------------
  25. // CONSOLE