0

How to configure the Akka application to generate the heap dump on crash (out of memeory). Tried searching but could not find the information. Can some one help me on this?

Prakash
  • 548
  • 5
  • 19

1 Answers1

2

Add these flags to your JVM on startup: $ java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=~/heapdump.hprof YourAppName

jamie
  • 1,931
  • 1
  • 11
  • 7
  • Thank you. In tomcat even if we did not add this flag we used to get the dump is there any similar option. if we did not mention this flag we wont get the dump? – Prakash Jul 07 '16 at 03:56
  • Guess not, haven't used Tomcat in forever. Tomcat must have set the property manually on startup. Akka doesn't need Tomcat (or any other servlet container), so you have to treat it like an ordinary Java process. – jamie Jul 07 '16 at 22:04