Weblogic heapdump configuration

The previous week, Weblogic in the production environment went down twice in a row and had to go back to log analysis on Sunday.
However, because the memory parameters are not configured with GC parameters, the HeapDump file before the crash was not generated. So you still need to configure the GC parameters to find the root of the problem next time.
 
Configuration memory parameters method, didn’t find in Weblogic console where you can configure the memory parameters, the method of directly only directly in bea/user_projects/domains/domain/bin/setDomainEnv. Sh on increase
“+ PrintGCDetails – – XX: XX: + PrintGCTimeStamps – XX: XX: + HeapDumpOnOutOfMemoryError – + HeapDumpOnCtrlBreak Xloggc: $$. Gc. Log”
 
The configuration is as follows:

 
GC – XX: + PrintGCDetails: used to track system details;
– Xloggc: $$. Gc. Log: will the gc event every time the record to a file.
-XX:+PrintGCTimeStamps: can be mixed with -XX:+ printGC-XX :+PrintGCDetails :11.851: [GC 98328K-& GT;93620K(130112K), 0.0082960 secs]
– XX: + HeapDumpOnOutOfMemoryError: the JVM when abnormal OOM to Dump the memory image file
– XX: + HeapDumpOnCtrlBreak: said can kill 3 & lt; pid> Generate DUMP files as needed
 
But pay attention to:
Oracle JVM version 6.0 removes the -xx :+HeapDumpOnCtrlBreak parameter. If you need to generate DUMP files, use the Jmap command. The command line format is as follows:
Jmap – dump: the format = b, the file = managed1_heapdump. Hprof & lt; pid>
Managed1_heapdump.hprof represents the name of the generated DUMP file and PID represents the Java process number.
 
 
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 
The resulting.hprof file USES the HeapAnalyzer tool, an analysis tool for HeapDump, a memory text image of the IBM JDK.


Read More: