# Elasticsearch Heapdump Location?

**URL:** <https://discuss.elastic.co/t/elasticsearch-heapdump-location/91395>\
**Category:** Elasticsearch\
**Created:** [June 30, 2017, 9:27am UTC](https://discuss.elastic.co/t/elasticsearch-heapdump-location/91395 "2017-06-30T09:27:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [June 30, 2017, 9:27am UTC](https://discuss.elastic.co/t/elasticsearch-heapdump-location/91395/1 "2017-06-30T09:27:27Z")

</div>

Hi,

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?

Thanks

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [June 30, 2017, 9:21pm UTC](https://discuss.elastic.co/t/elasticsearch-heapdump-location/91395/2 "2017-06-30T21:21:57Z")

</div>

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:](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.

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [July 3, 2017, 6:48am UTC](https://discuss.elastic.co/t/elasticsearch-heapdump-location/91395/3 "2017-07-03T06:48:39Z")

</div>

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 ?  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 31, 2017, 6:48am UTC](https://discuss.elastic.co/t/elasticsearch-heapdump-location/91395/4 "2017-07-31T06:48:58Z")

</div>

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