es-tmpdir.asciidoc 1.2 KB

1234567891011121314151617181920212223
  1. [[es-tmpdir]]
  2. === Temp directory
  3. By default, Elasticsearch uses a private temporary directory that the startup
  4. script creates immediately below the system temporary directory.
  5. On some Linux distributions a system utility will clean files and directories
  6. from `/tmp` if they have not been recently accessed. This can lead to the
  7. private temporary directory being removed while Elasticsearch is running if
  8. features that require the temporary directory are not used for a long time.
  9. This causes problems if a feature that requires the temporary directory is
  10. subsequently used.
  11. If you install Elasticsearch using the `.deb` or `.rpm` packages and run it
  12. under `systemd` then the private temporary directory that Elasticsearch uses
  13. is excluded from periodic cleanup.
  14. However, if you intend to run the `.tar.gz` distribution on Linux for an
  15. extended period then you should consider creating a dedicated temporary
  16. directory for Elasticsearch that is not under a path that will have old files
  17. and directories cleaned from it. This directory should have permissions set
  18. so that only the user that Elasticsearch runs as can access it. Then set the
  19. `$ES_TMPDIR` environment variable to point to it before starting Elasticsearch.