Common approaches for heap dump generation

In general, you can use the following options to generate a heap dump:

  1. Set specific flags to force the following behaviors:
    • Heap dump generation if the heap is full and an out-of-memory condition occurs
    • Heap dump generation if an application CTRL-BREAK or SIGQUIT occurs
    Combine these options with options instructing the JVM to generate the heap dump at a specific directory location.
  2. Use tools to connect to a running JVM. Such tools provide the option to trigger a heap dump.