增加永久空间 [英] Increase permgen space

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

问题描述

我正在使用 tomcat 6.0,当我正在编制索引时(不是在我启动 tomcat 时),我有一个永久空间错误.
我怎样才能增加那个空间??

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.

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

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