当我将 PermGen 设置为 128M 以上时,为什么我的 Sun JVM 无法初始化? [英] Why does my Sun JVM fail to initialize when I set PermGen above 128M?

查看:27
本文介绍了当我将 PermGen 设置为 128M 以上时,为什么我的 Sun JVM 无法初始化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要增加我的永久代.目前我将以下内容作为命令行参数传递:

I need to increase my PermGen. Currently I pass the following as command line parameters:

-XX:PermSize=128m-XX:MaxPermSize=128m

这有效.但是,如果我尝试增加这些值,我的 JVM 将无法初始化,并出现以下错误:

This works. If I try to increase the values, however, my JVM fails to initialize, giving me this error:

[2009-06-18 01:39:44] [info] 初始化虚拟机时出错[2009-06-18 01:39:44] [info] 无法为对象堆保留足够的空间[2009-06-18 01:39:44] [信息][2009-06-18 01:39:44] [395 javajni.c] [错误] CreateJavaVM 失败

具体来说,我正在尝试在包含的 JRE6 中启动 Tomcat,但我认为这无关紧要.

Specifically, I'm trying to boot up Tomcat in the included JRE6, but I don't think this should matter.

我正在运行具有 2GB RAM 的 Win2k3 VM 映像.我使用带有以下参数的 Monitor Tomcat 应用程序启动 JVM:

I'm running Win2k3 VM image with 2GB of RAM. I boot the JVM using the Monitor Tomcat application with the following parameters:

初始内存池:1024,最大内存池:1536

Initial memory pool: 1024, maximum memory pool: 1536

-XX:PermSize=128m-XX:MaxPermSize=128m-XX:+CMSPermGenSweepingEnabled-XX:+CMSClassUnloadingEnabled-XX:+UseConcMarkSweepGC-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 6.0\endorsed-Djava.io.tmpdir=E:\tomcat\temp-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager-Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\logging.properties

推荐答案

Perm Gen 是 Heap 的附加组件,因此请检查进程——您需要有 1.5 GB 以上的 2G 可用空间.

Perm Gen is additive to Heap, so check the processes -- you'll need to have 1.5+ GB of your 2G available.

这篇关于当我将 PermGen 设置为 128M 以上时,为什么我的 Sun JVM 无法初始化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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