Skip to content

Commit 953f414

Browse files
committed
nginx
1 parent 2343267 commit 953f414

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

markdown-file/monitor.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,11 @@ Out of memory: Kill process 19452 (java) score 264 or sacrifice child
818818
- 在刚刚输出的那个 log 文件中搜索:`3071`,可以找到:`nid=0x3071`
819819
- 使用 `jstat -gc PID 250 10`,查看gc情况(截图)
820820
- 使用 `jstat -gccause PID`:额外输出上次GC原因(截图)
821-
- 使用 `jmap -dump:format=b,file=/opt/dumpfile-tomcat1-PID-20180917 PID`,生成堆转储文件
821+
- 使用 `jstat -gccause PID 10000 10`:额外输出上次GC原因,收集 10 次,每隔 10 秒
822+
- 使用 `jmap -dump:format=b,file=/opt/dumpfile-tomcat1-PID-20180917.hprof PID`,生成堆转储文件
822823
- 使用 jhat 或者可视化工具(Eclipse Memory Analyzer 、IBM HeapAnalyzer)分析堆情况。
823824
- 结合代码解决内存溢出或泄露问题。
825+
- 给 VM 增加 dump 触发参数:`-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/tomcat-1.hprof`
824826

825827
#### CPU 低,负载高,访问慢(带数据库)
826828

0 commit comments

Comments
 (0)