简体   繁体   English

PermGen空间问题

[英]PermGen Space Issue

Environment: Windows Server 2003 x86 Intel Xeon 2.3 4gb Ram | 环境:Windows Server 2003 x86 Intel Xeon 2.3 4gb Ram | Windows Server 2003 tomcat 7.0.27 | Tomcat 7.0.27 | jdk 1.7.0.25 杰克1.7.0.25

I am facing the OutOfMemoryError. 我正面临OutOfMemoryError。 SO suggests using java options to increase the permgen space using following options 因此建议使用Java选项使用以下选项来增加permgen空间

-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC

However tomcat status page still shows the permgen memory as 64MB. 但是,tomcat状态页仍显示permgen内存为64MB。 Why cant it pick up the value specified in the parameters? 为什么不能选择参数中指定的值?

There is no PermGen in the status page, see this http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Introduction . 状态页面中没有PermGen,请参阅此http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Introduction

Anyways you conf seems OK 无论如何,你conf似乎还可以

Since PermGen is a java thing (not tomcat) you should use java tools to check it, take a look at this . 由于PermGen是Java事物(不是tomcat),因此您应该使用Java工具对其进行检查,请查看this

As your settings seem ok, check the way you apply them: If you start tomcat via batch file, create setenv.bat with the content 设置似乎没问题,请检查应用方式:如果您通过批处理文件启动tomcat,请使用以下内容创建setenv.bat

  CATALINA_OPTS="-Dyour-settings-from-above ... all of them"

If you start a service, you'll need to update the service configuration - as I'm not on Windows, it's a long time since I did that. 如果启动服务,则需要更新服务配置-因为我不在Windows上,所以已经很久了。 Did you use the tomcatw.exe to create/configure the service? 您是否使用tomcatw.exe创建/配置服务? Not sure... 不确定...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM