学无先后,达者为师

网站首页 编程语言 正文

如果服务器出现内存泄漏,堆内存缓慢上涨,一段时间后触发了fullGc,如何快速定位?

作者:小哥骑单车 更新时间: 2022-11-29 编程语言

1、最近有没上过线,最近历史记录,代码改动有没可能造成泄露

2、如果需要快速定位: 

     jmap -histo 18640|head -20 

-histo[:live]        to print histogram of java object heap; if the "live"
                         suboption is specified, only count live objects


3、如果不考虑系统会被暂停,导致stop the world的情况,可以dump分析 

jmap -dump:format=b,file=/tmp/heap.hprof <PID>

原文链接:https://blog.csdn.net/lejustdoit/article/details/120862129

栏目分类
最近更新