Harvest Java Heap Dumps in constrained environments

Creating and analyzing Heap Dumps is a standard for analyzing memory issues with JVM based programs. To do this, you have to:

  • create the Heap Dump (duh!)
  • move the data to your computer
  • actually analyze the data

Each of these steps has it's own challenges though the first two seem trivial at first sight.

Creating the Heap Dump

The main challenge in Heap Dump creation I faced in today's production environments is that only essential software is installed in order to keep containers and the potential attack surface small. So likely there is only a JVM which is enough to run the program but not enough to get a Heap Dump. Through the recommendation of a colleague I became aware of jattach. It describes itself as:

[Read More]
java  jvm  heap  gc