Elasticsearch ships withs -XX:+HeapDumpOnOutOfMemory enabled, this leads to the heap dumps being generated whenever the JVM encounters an OutOfMemoryError.
These generate hprof files in with default location as /var/lib/elasticsearch/ the question i have is how to safely delete these files without affecting the system(running elasticsearch instance).
Elasticsearch does not open them so you can just delete heap dumps like any other file with rm on the command line.
Heap dumps are often useful to understand why the application ran out of memory. I'd advise against it but if you are a 100% certain that you don't want them you can disable it explicitly by setting -XX:-HeapDumpOnOutOfMemory instead.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.