How to take Java Thread and Heap Dumps
Weblogic is nothing but a java process. So like any other java process we can take Thread and Heap dumps to analyze issues. Let us look at them one by one. Thread Dump : Thread dump gives a snapshot of threads at the time of taking dumps. It is primarily used to analyze performance and lock/resource contention issues. It is recommended to take 5-6 thread dumps in intervals of 10-15 seconds to understand if there is any issue. With single thread dump we won’t be able judge if it contention is momentarily or of long duration. There are multiple ways of taking thread dumps but my personal choice is jstack as we can take dumps even during most of the jvm hangs. 1) Using WLST : This method is not recommended as weblogic doesn’t respond during high loads. Also, wlst uses lot of resources. Following code snippet is taken from Oracle documentation: Place following code in a file code thread_dump.py. Please make changes according to your setup. serverName = ‘soa_server1’ ...