tomcat服务器java.lang.OutOfMemoryError: PermGen space

一挂就报内存溢出 下面是TOMCAT日志 
JAVA程序是没有报错,

Nov 24, 2009 4:07:02 PM org.apache.catalina.core.ApplicationDispatcher invoke 
SEVERE: Servlet.service() for servlet jsp threw exception 
java.lang.OutOfMemoryError: PermGen space 
Nov 24, 2009 4:07:02 PM org.apache.catalina.core.StandardWrapperValve invoke 
SEVERE: Servlet.service() for servlet action threw exception 
java.lang.OutOfMemoryError: PermGen space 
Exception in thread "http-8180-36" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "http-8180-35" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" java.lang.OutOfMemoryError:

PermGen space 
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" java.lang.OutOfMemoryError:

PermGen space 
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" java.lang.OutOfMemoryError:

PermGen space 
Login Success! 
Exception in thread "http-8180-23" java.lang.OutOfMemoryError: PermGen space 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting ‘action‘ on ‘class

com.szyt.ajax.SuggestedMessage: Error setting expression ‘action‘ with value ‘[Ljava.lang.String;@14653f5 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting ‘verificationStatus‘ on ‘class

com.szyt.ajax.SuggestedMessage: Error setting expression ‘verificationStatus‘ with value ‘[Lj 
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" java.lang.OutOfMemoryError:

PermGen space 
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" java.lang.OutOfMemoryError:

PermGen space 
Exception in thread "http-8180-14" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" java.lang.OutOfMemoryError:

PermGen space 
Exception in thread "Thread-12" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "http-8180-37" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "http-8180-25" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "Timer-0" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "Thread-10" java.lang.OutOfMemoryError: PermGen space 
Exception in thread "http-8180-39" java.lang.OutOfMemoryError: PermGen space

解决方案:

非堆空间不足,其实设置已经很大了-XX:PermSize256M -XX:MaxPermSize:512M

应该是 PermGen space 在tomcat 默认是 64m 通常足够用了,溢出原因看 http://wiki.apache.org/tomcat/FAQ/Deployment,其中关键的是

引用:
Because the Classloader (and the Class objects it loaded) cannot be recycled.

其它参考 http://wiki.apache.org/tomcat/OutOfMemory

考虑使用 -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled
_________________

时间: 2024-07-30 02:32:36

tomcat服务器java.lang.OutOfMemoryError: PermGen space的相关文章

windows系统bat方式启动tomcat出现java.lang.OutOfmemoryError:PermGen Space 错误

1.问题情景: 在部署项目时,将两个应用部署到同一个tomcat下,通过startup.bat启动服务时,控制台出现出现java.lang.OutOfmemoryError:PermGen Space 错误服务器环境:    系统版本:windows server 2008 r2    安装内存:64GB    处理器:8核(具体型号记不得了) 2.解决方法: PermGen Space:全称是Permanent Generation Space,是指内存的永久保存区域,这块内存主要是被JVM存

Tomcat报java.lang.OutOfMemoryError: PermGen space错误

java.lang.OutOfMemoryError: PermGen space解决方案 : -Xms512m -Xmx1024m -XX:MaxPermSize=256m

Tomcat Xms Xmx PermSize MaxPermSize 区别 及 java.lang.OutOfMemoryError: PermGen space 解决

解决方案 在 catalina.bat 里的 蓝色代码前加入: 红色代码 rem ----- Execute The Requested Command --------------------------------------- set JAVA_OPTS=%JAVA_OPTS%-server -Xms800m -Xmx1024m  -XX:PermSize=128m -XX:MaxPermSize=256m echo Using CATALINA_BASE: "%CATALINA_BASE

tomcat 开启时,或者访问网页后PermGen space错误解决方法 java.lang.OutOfMemoryError: PermGen space

公司以前都是一个项目一个tomcat,为了整合,我把两个项目放到了一个tomcat下,结果打开tomcat后,随便访问几个网页,或者登录一个账号后就会报错,提示 java.lang.OutOfMemoryError: PermGen space 上网搜索后,发现是JVM的默认内存只有4M太小,开启tomcat后要加载所有项目,就会导致JVM的内存溢出. Windows下tomcat修改 .编辑tomcat的catalina.bat文件,在第一行的后面增加一句:set JAVA_OPTS=-ser

Tomcat – Java.Lang.OutOfMemoryError: PermGen Space

很多时候,在开发阶段Tomcat重复的重启过程中会遇到java.lang.OutOfMemoryError : PermGen space 错误. 1 2 3 4 java.lang.OutOfMemoryError: PermGen space         at java.lang.ClassLoader.defineClass1(Native Method)         at java.lang.ClassLoader.defineClass(ClassLoader.java:620

Tomcat – java.lang.OutOfMemoryError: PermGen space Cause and Solution

Read more: http://javarevisited.blogspot.com/2012/01/tomcat-javalangoutofmemoryerror-permgen.html#ixzz3QDWa3Zqi Tomcat web server often suffers from java.lang.OutOfMemoryError: PermGen space whenever you deploy and undeploy your web application coupl

Tomcat内存溢出解决java.lang.OutOfMemoryError: PermGen space

背景:把两个项目同时部署在tomcat,启动快好的时候,报java.lang.OutOfMemoryError: PermGen space 原因:因为两个项目的jar包太多,JVM把里面的class文件加载时把默认的内存撑爆了 解决方法: (1)查找了很多网上的方法,但是还是解决不了我的问题.我的解决方法是: 右键eclipse项目==>run as===èrun Configuration=看左边的Apache Tomcat 下面的tomcat…=è点击后右边的Argument, VM ar

解决tomcat中server.xml设置二级域名 [java.lang.OutOfMemoryError: PermGen space]

<Host name="XXX.XXX.XXX" debug="0" appBase="C:\\JavaWeb\\mytomcatServer\\XXX"  unpackWARs="true" autoDeploy="true"  xmlValidation="false" xmlNamespaceAware="false">  <Alias>

Tomcat 性能调优 出现java.lang.OutOfMemoryError: PermGen space

Tomcat 在部署应用中,Server报错:java.lang.OutOfMemoryError: PermGen space,问题就是Tomcat内存分配的太小了. 解决办法 1: 修改Tomcat\bin\catalina.bat文件.找到 tomcat6 为 set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.conf