Blog
Heap Dumps Are Evidence—and A Production Hazard
A heap dump can expose the object retaining ten gigabytes. It can also pause a busy JVM, fill the disk, and copy secrets into a file somebody uploads casually.
Check The Blast Radius First
Confirm free disk space on the target filesystem and leave operational headroom. The dump may be near the live heap size. Understand whether the collection method requests a full collection or pauses application threads, and avoid guessing during peak load.
If replicas exist, drain one safely before capture. For a single critical instance, consider lower-impact evidence first: GC logs, class histograms, allocation profiles, native memory summaries, and Java Flight Recorder.
Treat The File As Sensitive Data
Heap contents may include access tokens, customer records, request payloads, encryption material, and credentials. Write to a protected path, encrypt transfer, restrict analysts, record custody, and define deletion time.
Do not attach a dump to a normal issue tracker.
Capture Evidence Around It
Record timestamp, process ID, JVM flags, heap limits, traffic state, recent deploys, and relevant metrics. A dump is one frame; the surrounding timeline explains how the process reached it.
Test the procedure outside production. Verify that the chosen tool exists in the image and that the storage path is real. Incident response is the wrong moment to discover a stripped runtime.