xiaobaoqiu Blog

Think More, Code Less

JVM内存DUMP参数配置

在JVM出现内存溢出或泄露时,为便于排查和定位,需要JVM的启动上增加相应的参数。主要是GC日志和内存DUMP参数.

1.GC日志

1
-Xloggc:$CATALINA_BASE/logs/gc.log

2.内存DUMP

1
2
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=$CATALINA_BASE/logs/heapDump.log