简体   繁体   English

堆转储分析-查找OutOfMemory异常的根本原因

[英]Heap Dump Analysis - Find root cause of OutOfMemory Exception

I am running an application that has 4 gigs of maxmimum heap size -Xms4096m -Xmx4096m -Xmn1024m with GC configured as -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=50 and GC interval of Dsun.rmi.dgc.server.gcInterval=43200000 -Dsun.rmi.dgc.client.gcInterval=43200000 我正在运行一个最大堆大小为4 gigs -Xms4096m -Xmx4096m -Xmn1024m且GC配置为-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=50并且GC间隔为Dsun.rmi.dgc.server.gcInterval=43200000 -Dsun.rmi.dgc.client.gcInterval=43200000

Suddenly my application went to heap out of memory exception and i took thread dumps and heap dumps on the same occasion. 突然我的应用程序去了内存不足的堆,我在同一场合进行了线程转储和堆转储。 On analyzing Thread dumps, thread are stuck due to creating some value to a hashMap and arrayList. 在分析线程转储时,由于为hashMap和arrayList创建一些值而导致线程卡住。 ByteArrayOutStream has created locks in one of the thread. ByteArrayOutStream已在线程之一中创建了锁。

On Analysing Heap dump in eclipse memory analyzer tool, it clearly says bytearray object has occupied almost 1 Gigs of Heap. 在eclipse内存分析器工具中的“分析堆转储”上,它清楚地表明bytearray对象已经占据了将近1 Gigs的堆。 From the GCViewer it shows it has a peak in fraction of second. 从GCViewer可以看出,它的峰值只有几分之一秒。 I am clue less why suddenly Byte array object used 1 Gigs of space. 我不太清楚为什么字节数组对象突然使用了1 Gigs的空间。 Can some one help me out to narrow down the culprit. 有人可以帮我缩小罪魁祸首的范围吗?

-- Application Server - Weblogic 12c -应用服务器-Weblogic 12c

On Analysing Heap dump in eclipse memory analyzer tool, it clearly says bytearray object has occupied almost 1 Gigs of Heap. 在eclipse内存分析器工具中的“分析堆转储”上,它清楚地表明bytearray对象已经占据了将近1 Gigs的堆。

Use the shortest paths to GC root feature of MAT to see which references are holding onto that byte array. 使用最短路径到MAT的GC根功能,可以查看哪些引用保留在该字节数组上。

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

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