Elasticsearch Heapdump Location?


I want to know where my heap dump will be stored since i want to analyse what is going on my ES because some times it is giving OUTOFMEMORY exception.

When i had given ps -ef | grep elastic i can see the following

elastic+ 2527 1 11 08:47 ? 00:03:59 /usr/bin/java -Xms1720m -Xmx1720m -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Djna.nosys=true -Dmapper.allow_dots_in_name=true -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/elasticsearch-2.4.1.jar:/usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch start -d -p /var/run/elasticsearch/elasticsearch.pid --default.path.home=/usr/share/elasticsearch --default.path.logs=/var/log/elasticsearch --default.path.data=/var/lib/elasticsearch --default.path.conf=/etc/elasticsearch

In this it has mentioned that XX:+HeapDumpOnOutOfMemoryError which will take heap dump when an OUTOFMEMORYError is created. I want to know where this dump will be stored?


Assuming you use Oracle JVM, you can check this page to specify the location you prefer: http://www.oracle.com/technetwork/java/javase/clopts-139448.html:

By default the heap dump is created in a file called java_pid pid .hprof in the working directory of the VM, as in the example above. You can specify an alternative file name or directory with the -XX:HeapDumpPath= option. For example -XX:HeapDumpPath=/disk2/dumps will cause the heap dump to be generated in the /disk2/dumps directory.

Thanks @Julien

What would be my default location of Thread dump in elasticsearch? Sry i am new to this environment .

I even tried by giving command to find all the files that ends with .hprof extension. I had given these commands

ls .hprof
ls java_*.hrpof

Now i am worried whether the Javadump has been generated or not ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.