What is the difference in java.lang.OutOfMemory: GC Overhead limit exceeded vs. java.lang.OutOfMemory: Multicast listener

こ雲淡風輕ζ 提交于 2020-01-04 02:07:28

问题


I am investigating the slowness in our application and eventually one of the instances in a cluster environment going down. Few weeks back I came across the error below:

[#|2012-05-11T14:12:03.460-0400|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=89;_ThreadName=httpSSLWorkerThread-7311-0;_RequestID=7afaee11-c970-40dd-b5fb-29498af8e512;|StandardWrapperValve[LoginModule]: PWC1406: Servlet.service() for servlet LoginModule threw exception
java.lang.OutOfMemoryError: GC overhead limit exceeded

I figured that since GC overhead limit was exceeding, it had something to do with my application. There is a report that is really intensive on putting records in excel using POI, so I thought that might be causing it. As a short term fix, until next release, we informed 1 user who had access to this report to not access it.

However, today, two weeks later again one of the instances went down and upon searching the logs I found the error below:

[#|2012-06-05T10:31:36.532-0400|SEVERE|sun-appserver2.1|net.jxta.impl.endpoint.mcast.McastTransport|_ThreadID=141;_ThreadName=IP Multicast Listener for mcast://228.8.10.93:31676;_RequestID=90caf76e-b740-4f11-8ffe-8ab88a740569;|Uncaught Throwable in thread :IP Multicast Listener for mcast://228.8.10.93:31676
java.lang.OutOfMemoryError: Java heap space
|#]

Please note the difference in GC overhead limit exceeded vs. Java heap space. I am trying to find out whether the error I saw today is caused by the same reason of the user accessing the report, however, I believe if that were the case then I would see GC overhead limit exceeded.

I believe the error today is more related to the configuration of the server.

please help in clarifying.


回答1:


The first error "GC Overhead" means that GC is taking large portion of CPU cycle, mostly it means 98% or 99% and in each run it is releasing very less memory 1-2%.

The second error means your application went out of memory during some processing.

Also your investigation is correct of POI using up too much of memory, POI has a history of extra memory consumption.

Came across a very good discussion on SO




回答2:


There is a good discussion on a similar topic here. It is basically caused when a lot of time is consumed by GC but very little memory is recovered.



来源:https://stackoverflow.com/questions/10901808/what-is-the-difference-in-java-lang-outofmemory-gc-overhead-limit-exceeded-vs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!