解决Grails / Groovy内存泄漏问题? [英] Troubleshooting Grails/Groovy memory leaks?

查看:93
本文介绍了解决Grails / Groovy内存泄漏问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Grails应用程序,可以完成相当多的域对象创建和销毁工作,而且它似乎以非常快的速度用完了PermGen空间。我已经做了一些调整(将PermGen撞到256M,启用GC类等),但没有骰子。



有人会推荐一些(并希望免费或者非常低成本的)工具来解决Groovy和/或Java中这种内存消耗问题?或者您使用某些技术来排除JVM内存问题?编辑:这是应用程序以生产模式部署在Tomcat内部时的情况;我还没有尝试过使用其他容器。即使如此,最好有一些资源来追踪问题。

你试过了吗?

  -XX:+ CMSClassUnloadingEnabled -XX:+ CMSPermGenSweepingEnabled 



加上常见的嫌疑犯( -Xmx -Xms -XX:PermSize -XX:MaxPermSize )this解决了我们生产的Tomcat上的所有PermGen问题,这些问题在部署应用程序后不久就发生了。之后从未见过另一个OOM异常。 : - )

I've got a Grails application that does a fairly decent amount of domain object creation and destruction, and it seems to run out of PermGen space at a very, very rapid rate. I've done the usual tweaks (bumped PermGen to 256M, enabled class GC, etc.), but no dice.

Would anyone care to recommend some (and hopefully free or very low-cost) tools for troubleshooting this sort of memory consumption in Groovy and/or Java? Or some techniques that you use to troubleshoot JVM memory problems?

Edit: This is when the application is deployed inside Tomcat in production mode; I've not tried with other containers. Even so, it would be nice to have some resources for tracking down the problem.

解决方案

Have you tried

-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

?

Together with increasing the usual suspects (-Xmx, -Xms, -XX:PermSize and -XX:MaxPermSize) this resolved all the PermGen issues on our production Tomcat, which had occured pretty soon after deploying the app. Never seen another OOM-Exception after that. :-)

这篇关于解决Grails / Groovy内存泄漏问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆