# Collecting heap dump in Gateway

**URL:** <https://forum.inductiveautomation.com/t/collecting-heap-dump-in-gateway/6494>\
**Category:** Module Development\
**Created:** [May 16, 2013, 12:51am UTC](https://forum.inductiveautomation.com/t/collecting-heap-dump-in-gateway/6494 "2013-05-16T00:51:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [May 16, 2013, 12:51am UTC](https://forum.inductiveautomation.com/t/collecting-heap-dump-in-gateway/6494/1 "2013-05-16T00:51:04Z")

</div>

I have a customer that is experiencing out-of-memory errors in the Gateway - causes Gateway re-starts. I’d like to collect information for analysis - tried changing the ignition.conf file. My attempt shown below was only a guess and didn’t work. What should it have been?

NOTE: Configuration below has been edited/corrected per Kevin’s suggestions …

```auto
. . .
# Java Additional Parameters
wrapper.java.additional.1=-XX:PermSize=64m
wrapper.java.additional.2=-XX:MaxPermSize=128m
wrapper.java.additional.3=-XX:+UseConcMarkSweepGC
wrapper.java.additional.4=-XX:+CMSClassUnloadingEnabled
wrapper.java.additional.5=-XX:+CMSPermGenSweepingEnabled
wrapper.java.additional.6=-Ddata.dir=data
wrapper.java.additional.7=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
wrapper.java.additional.8=-Xdebug
wrapper.java.additional.9=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
wrapper.java.additional.10=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.11=-XX:HeapDumpPath=/Users/me/Datafiles
. . .
```

Thanks,  
— chuck

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 16, 2013, 3:48pm UTC](https://forum.inductiveautomation.com/t/collecting-heap-dump-in-gateway/6494/2 "2013-05-16T15:48:00Z")

</div>

I think those parameters are just supposed to be ‘10’ and ‘11’, not ‘a’ and ‘b’.

---

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [May 17, 2013, 3:02am UTC](https://forum.inductiveautomation.com/t/collecting-heap-dump-in-gateway/6494/3 "2013-05-17T03:02:03Z")

</div>

Unfortunately the gateway won’t start if I add options as proposed above - even with the re-numbering, Bottom line is I still don’t know how to get an out-of-memory dump friom the Gateway,

– chuck

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 17, 2013, 3:26am UTC](https://forum.inductiveautomation.com/t/collecting-heap-dump-in-gateway/6494/4 "2013-05-17T03:26:55Z")

</div>

This [JVM options documentation](http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html) says the option is “-XX:-HeapDumpOnOutOfMemoryError”, and I see you’re using a ‘+’ instead.

I’m able to start a gateway successfully using the correct option.

---

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [May 18, 2013, 3:05pm UTC](https://forum.inductiveautomation.com/t/collecting-heap-dump-in-gateway/6494/5 "2013-05-18T15:05:08Z")

</div>

Thanks Kevin, got it correctly configured (though I haven’t seen a dump yet). I edited the original post to show it corrected.  
— chuck
