1

我们的生产服务器出现 OOM,因为 permgen 已满。使用jmap -permstat检查 permgen 区域,我们发现有很多由com.sun.xml.ws.client.WSSServiceDelegatingLoader. 加载的类是com.sun.proxy.$ProxyXXX,其中XXX是一个 int 序列。 在此处输入图像描述

这些类加载的堆栈跟踪如下: 在此处输入图像描述

最终,JVM OOM,full gc 无法回收任何 permgen 内存。奇怪的是,如果我在 VisualVM 中单击 System GC,则会卸载类并且 permgen 的使用会下降。 在此处输入图像描述

我们的 JDK 版本是 1.7.0.80,我们添加了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 补丁。这真的让我很困惑。有人可以帮我解决这个问题,非常感谢!

4

1 回答 1

0

This is a known bug https://github.com/javaee/metro-jax-ws/issues/1161

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] )

Solution/Workaround: Replace JAX-WS client where this bug is solved.

于 2021-04-20T21:21:46.067 回答