增加permgen空间 [英] Increase permgen space

查看:94
本文介绍了增加permgen空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用tomcat 6.0,虽然我正在编制索引(而不是在我启动tomcat时),我有一个permgen空间错误。

我怎么能增加那个空间?

I am working with tomcat 6.0, and while I am indexing (not while i am starting tomcat), I have a permgen space error.
How could I increase that space??

谢谢

推荐答案

您可以使用:

-XX:MaxPermSize=128m

增加空间。但这通常只会推迟不可避免的事情。

to increase the space. But this usually only postpones the inevitable.

您还可以启用PermGen进行垃圾回收

You can also enable the PermGen to be garbage collected

-XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

通常在进行大量重新部署时会发生这种情况。我很惊讶你使用像索引这样的东西。使用virtualvm或jconsole监视Perm gen空间并在预热索引后检查它的级别。

Usually this occurs when doing lots of redeploys. I am surprised you have it using something like indexing. Use virtualvm or jconsole to monitor the Perm gen space and check it levels off after warming up the indexing.

也许您应该考虑更改为另一个JVM,如IBM JVM。它没有永久生成,并且不受此问题的影响。

Maybe you should consider changing to another JVM like the IBM JVM. It does not have a Permanent Generation and is immune to this issue.

这篇关于增加permgen空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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