Heap Dump¶
A heap dump is a complete snapshot of everything in the JVM's memory: every object, and every reference holding it. It is the tool that answers "what is using all this memory", and it is the most expensive thing in the Help -> Monitor Server Resources dialog by a wide margin.
This does pause QIE for several minutes
The dialog's own warning is emphatic, and it is accurate: creating a heap dump pauses engine execution for several minutes. Message processing stops. Receivers are not reading. Senders are not sending. On a busy production system that is an outage, and on an HL7 socket receiver it can mean the sending system's queue backs up or its connection times out.
Take one on production only when you have decided the diagnosis is worth the pause, and preferably in a maintenance window. Run the cheaper tools first.
Before taking one¶
Work through the cheaper options, because they frequently make the heap dump unnecessary:
- Run GC. If used memory drops afterwards, there is no leak. You were looking at uncollected garbage, and a heap dump would have cost an outage to tell you nothing.
- View Threads. A single channel buffering an enormous message is often visible as a busy thread rather than as a memory mystery.
- Consider whether the answer is already known. A channel handling large files or DICOM images without streaming consumes memory proportional to message size. See Passing Through Large Files Without Loading Them Into Memory and Handling Large DICOM Images.
Take the heap dump when Run GC does not free the memory, which means it is genuinely reachable and something is holding it.
The file¶
Written to the QIE home directory on the server:
The dialog confirms the filename when it completes.
Check for disk space first
An .hprof is roughly the size of the used heap. On a server configured with a large heap that can be many gigabytes, written into the QIE home directory, the same volume as the logs and, depending on configuration, the nightly configuration backups. Filling that volume turns a memory investigation into an outage of a different kind.
Confirm the free space before you start, and move or delete the file once it has been analyzed.
Analysing it¶
The file is not human-readable; it needs a heap analyser such as Eclipse MAT or VisualVM. In practice this is normally a Qvera support exercise. Send the file rather than interpreting it yourself, and include the thread dump and exported logs alongside it so the memory picture has context.
Because of its size, an .hprof is usually transferred separately rather than through the log export.
In a cluster¶
The dump covers the single instance selected in the dialog, and only that instance is paused. Confirm which node is actually under memory pressure from Global System Status before paying the cost. Dumping the wrong node costs the outage and yields nothing.