简体   繁体   English

如何使用jhat / jvisualvm工具确定堆转储中的内存泄漏?

[英]How to pin point a memory leak in a heap dump using jhat/jvisualvm tool?

How to pin point a memory leak in a heap dump using jhat/jvisualvm tool? 如何使用jhat / jvisualvm工具确定堆转储中的内存泄漏?

I have a heap dump of our application generated using jmap during an "OutOfMemoryError:Java Heap Space error". 我在“ OutOfMemoryError:Java堆空间错误”期间使用jmap生成了我们的应用程序的堆转储。 I used jhat to analyse the dump but the info is too huge and I could not find where the memory leak occurred.Please help me in pin-pointing the objects that caused memory leaks. 我使用jhat来分析转储,但信息太大,无法找到内存泄漏发生的位置。请帮助我查明导致内存泄漏的对象。

Visual VM will show you that the perm gen is filled, which means OOM error. Visual VM将向您显示perm gen已填充,这意味着OOM错误。

When you get that heap dump , you'll be able to see the object with the most instances. 当您获得该堆转储时 ,您将能够看到具有最多实例的对象。 That should give you a clue as to the culprit. 那应该为您提供线索。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM