jvm full gc即使permgen已满也无法卸载类 [英] jvm full gc can't unload classes even permgen is full
问题描述
由于permgen已满,我们的生产服务器进行了OOM.使用 jmap -permstat
检查permgen区域,我们发现 com.sun.xml.ws.client.WSSServiceDelegatingLoader
加载了许多类.加载的类是 com.sun.proxy.$ ProxyXXX
,其中 XXX
是一个int序列.
Our production server went OOM because permgen is full. Using jmap -permstat
to check the permgen area, we found there were many classes loaded by com.sun.xml.ws.client.WSSServiceDelegatingLoader
. The loaded classes are com.sun.proxy.$ProxyXXX
, where XXX
is an int sequence.
这些类加载的堆栈跟踪如下:
the stacktrace for these classloading is as follow:
最终,JVM变成了OOM,完整的gc无法回收任何permgen内存.奇怪的是,如果我在VisualVM中单击系统GC",则将卸载这些类,并且permgen的使用率将下降.
eventually, the JVM went OOM, full gc can't reclaim any permgen memory. What is strange is that if I click System GC in VisualVM, the classes are unloaded and the usage of permgen goes down.
我们的JDK版本是1.7.0.80,我们添加了 CMSClassUnloadingEnabled
.
Our JDK version is 1.7.0.80, we have added CMSClassUnloadingEnabled
.
-XX:+ExplicitGCInvokesConcurrent
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=60
-XX:+UseParNewGC
-XX:+CMSParalledlRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:+CMSFullGCsBeforeCompaction=0
-XX:+CMSCLassUnloadingEnabled
-XX:MaxTenuringThreshold=18
-XX:+UseCMSInitialtingOccupancyOnly
-XX:SurvivorRatio=4
-XX:ParallecGCThreads=16
我们的代码已经运行了很长时间了.最新操作是WebLogic修补程序.这真的让我感到困惑.有人可以帮我解决这个问题,非常感谢!
Our code has been running for a long time. The most recent operation is a WebLogic patch. This really confused me. Could someone give me some help with this issue, many thanks!
推荐答案
这是一个已知的错误例如,每次使用Weblogic Server 12.1.3中捆绑的库JAX-WS RI 2.2创建JAX-WS客户端时,
Every time a JAX-WS client is created, for instance, using library JAX-WS RI 2.2 which is bundled in Weblogic Server 12.1.3
com.sun.xml.ws.client.WSServiceDelegate$DelegatingLoader#1
客户端代理类正被加载到类加载器中:
Client proxy classes are being loaded into classloader:
([Loaded com.sun.proxy.$Proxy979 from com.sun.xml.ws.client.WSServiceDelegate$DelegatingLoader] )
解决方案/解决方法:解决此错误的位置,请替换JAX-WS客户端.
Solution/Workaround: Replace JAX-WS client where this bug is solved.
这篇关于jvm full gc即使permgen已满也无法卸载类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!