java.lang.OutOfMemoryError:带有tomcat7 windows服务的PermGen空间 [英] java.lang.OutOfMemoryError: PermGen space with tomcat7 windows service
问题描述
我在 Windows Server 2008 R2上运行 tomcat 7.0.33
(我安装了tomcat作为Windows服务)
i am running tomcat 7.0.33 on windows server 2008 R2 (i installed tomcat as windows service)
- JDK版本:
jdk1.6.0_25 64位
-
Tomcat选项:
- Java虚拟机:
C:\Program Files\Java\jre6\bin\server\jvm.dll
(BTW,我没有客户端文件夹内部jre) - 初始内存池: 1000 MB
-
最大内存池: 2000 MB
- Java Virtual Machine:
C:\Program Files\Java\jre6\bin\server\jvm.dll
(BTW, i don't have client folder inside jre) - Initial memory pool: 1000 MB
Maximum memory pool: 2000 MB
当我检查服务器状态时,我可以看到服务器正在使用
我配置的内存。
when i check the server status, i can see that the server is using the memory i configured.
环境变量(SYSTEM VARIABLES)配置:
- JAVA_HOME:
C:\Program Files\Java\jdk1.6.0_25
- 路径:
...;%JAVA_HOME%\\ \\ _bin; ....
- JAVA_HOME:
C:\Program Files\Java\jdk1.6.0_25
- Path:
...;%JAVA_HOME%\bin;....
我是否还需要添加 CATALINA_HOME 和 JAVA_OPTS 系统变量?
do i need to add CATALINA_HOME and JAVA_OPTS system variables too ?
问题我有两个网络应用 APP1 ,* APP2 *
当我单独部署每个应用时,我可以找到记忆用途
ISSUE: i have two web applications APP1,*APP2* when i deploy each one separately, i can find that memory use for
APP1 = 198 MB
APP2 = 104 MB
APP1= 198 MB APP2= 104 MB
有关应用程序的信息:
APP1,APP2 :包含在其他小型库中的Spring Maven应用程序maven spring应用程序。
APP1,APP2: Spring Maven applications that includes in the libraries other small maven spring applications.
APP1:包含webservices,APP2使用它们。
APP1: contains webservices, that APP2 uses them.
如果我试图同时部署它们他们在同一个tomcat实例上,我总是得到
if i tried to deploy both of them on same tomcat instance, i always get
java.lang.OutOfMemoryError: PermGen space
请告知可能导致此问题的原因。
please advise what might be causing this issue.
推荐答案
解决方案是设置初始&最大内存池,是将 -XX:MaxPermSize = 1000m
添加到java选项卡中的java选项。
the solution was beside setting initial & maximum memory pool, is to add -XX:MaxPermSize=1000m
to the java options in the java tab.
这篇关于java.lang.OutOfMemoryError:带有tomcat7 windows服务的PermGen空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!