DEV Community

Cover image for ColdFusion Thread Dumps and Heap Analysis: Diagnosing JVM Crashes in Production
Deepak Sir
Deepak Sir

Posted on • Originally published at Medium

ColdFusion Thread Dumps and Heap Analysis: Diagnosing JVM Crashes in Production

ColdFusion runs on Tomcat inside a Java Virtual Machine, so most “ColdFusion crashes” are really JVM problems — and the two diagnostic artifacts that actually find the cause are thread dumps (a snapshot of every thread’s state, for diagnosing hangs, stuck requests, hot loops, and deadlocks) and heap dumps (a snapshot of all objects in memory, for diagnosing OutOfMemoryError and memory leaks). The workflow: first, identify the failure type from OutOfMemoryError in your logs and any hs_err_pid crash file. Capture thread dumps with jstack -l — take 3–5 a minute or two apart so you can see patterns. Capture heap dumps by adding -XX:+HeapDumpOnOutOfMemoryError and -XX:HeapDumpPath to jvm.config so one is written automatically at the crash, or on-demand with jcmd GC.heap_dump (preferred over jmap, which can hang the JVM). Then analyze the .hprof heap dump in Eclipse MAT, VisualVM, or JMC to find the leak. Adobe's Performance Monitoring Toolset (PMT) is the recommended capture method because it can trigger dumps automatically on alerts. This guide walks the full production workflow with the exact commands.
Read More

Top comments (0)