glassfish full gc每小时一次

编程入门 行业动态 更新时间:2024-10-25 16:22:24
本文介绍了glassfish full gc每小时一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我们在Glassfish应用程序中每小时看到一次完整的GC。从GC日志中提取:

9.210:[Full GC 28311K-> 27979K(6422528K),0.3770238秒] ... 3609.647:[Full GC 1186957K-> 597880K(6478208K),4.5102977 secs] ... 7214.192:[Full GC 742184K-> 595596K(6469504K), 4.3726625秒] ... 10818.805:[Full GC 756228K-> 570803K(6455936K),4.8630472秒]

只要Glassfish上涨,这种模式大致重复。其间的...是增量GC。时间似乎非常可疑 - 为什么我们会看到完整的GC每小时约一次?

JVM启动参数:

-Xms6400m -Xmx6400m -XX:NewSize = 1024m -XX:MaxNewSize = 1024m -XX:PermSize = 256m -XX:MaxPermSize = 1024m -XX:+ UseParallelGC -XX:+ UseParallelOldGC -Xloggc:C:\glassfish3\glassfish\domains\domain1\ logs \gc\gc.log -XX:+ AggressiveOpts -Xss1024k -XX:+ CMSClassUnloadingEnabled

根据JVisualVM的说法,我们没有接近堆空间的地方。

Glassfish 3.1.2.2,Oracle JDK 1.6.0_45,Windows Server 2008

解决方案

我怀疑你的RMI正在触发Full清理。 $ b

http:// docs.oracle/javase/6/docs/technotes/guides/rmi/sunrmiproper ties.html

双方

sun.rmi.dgc .server.gcInterval

当需要确保无法访问的远程对象未及时导出并进行垃圾回收时,此属性的值表示最大时间间隔毫秒),Java RMI运行时将允许在本地堆的垃圾回收之间进行。

默认值为3600000毫秒(1小时)

sun.rmi.dgc.client.gcInterval

在需要确保DGC干净呼叫不可及远程引用时及时传送时尚,此属性的值表示Java RMI运行时在本地堆的垃圾回收之间允许的最大时间间隔(以毫秒为单位)。默认值为3600000毫秒(1小时)。

默认为每小时检查。

我会将这些设置为一天或一周,因为您认为您不需要这些。

I'm seeing a full GC about once an hour in our Glassfish application. Extract from the GC log:

9.210: [Full GC 28311K->27979K(6422528K), 0.3770238 secs] ... 3609.647: [Full GC 1186957K->597880K(6478208K), 4.5102977 secs] ... 7214.192: [Full GC 742184K->595596K(6469504K), 4.3726625 secs] ... 10818.805: [Full GC 756228K->570803K(6455936K), 4.8630472 secs]

And this pattern roughly repeats as long as Glassfish is up. The "..." in between are incremental GCs. The timing seems awfully suspicious- why would we be seeing full GC's about once an hour?

JVM startup parameters:

-Xms6400m -Xmx6400m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:PermSize=256m -XX:MaxPermSize=1024m -XX:+UseParallelGC -XX:+UseParallelOldGC -Xloggc:C:\glassfish3\glassfish\domains\domain1\logs\gc\gc.log -XX:+AggressiveOpts -Xss1024k -XX:+CMSClassUnloadingEnabled

According to JVisualVM, we're no where close to running out of heap space.

Glassfish 3.1.2.2, Oracle JDK 1.6.0_45, Windows Server 2008

解决方案

I suspect your RMI is triggering a Full clean up.

docs.oracle/javase/6/docs/technotes/guides/rmi/sunrmiproperties.html

both

sun.rmi.dgc.server.gcInterval

When it is necessary to ensure that unreachable remote objects are unexported and garbage collected in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the Java RMI runtime will allow between garbage collections of the local heap. The default value is 3600000 milliseconds (one hour).

and

sun.rmi.dgc.client.gcInterval

When it is necessary to ensure that DGC clean calls for unreachable remote references are delivered in a timely fashion, the value of this property represents the maximum interval (in milliseconds) that the Java RMI runtime will allow between garbage collections of the local heap. The default value is 3600000 milliseconds (one hour).

default to hourly checks.

I would set these to a day or a week for you believe you don't need these.

更多推荐

glassfish full gc每小时一次

本文发布于:2023-11-27 07:04:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637073.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:每小时   glassfish   full   gc

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!