Exception in thread ""http-bio-80"exec-1" java.lang.OutOfMemoryError: PermGen s解决方案
2017-08-07 09:25
1471 查看
问题描述:
解决方案: 给tomcat指定的jdk加大启动的内存参数 -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m
一、java.lang.OutOfMemoryError: PermGen space PermGen space的全称是Permanent Generation space,是指内存的永久保存区域, 这块内存主要是被JVM存放Class和Meta信息的,Class在被Loader时就会被放到PermGen space中, 它和存放类实例(Instance)的Heap区域不同,GC(Garbage Collection)不会在主程序运行期对 PermGen space进行清理,所以如果你的应用中有很多CLASS的话,就很可能出现PermGen space错误, 这种错误常见在web服务器对JSP进行pre compile的时候。如果你的WEB APP下都用了大量的第三方jar, 其大小超过了jvm默认的大小(4M)那么就会产生此错误信息了。
解决方法: 手动设置MaxPermSize大小修改TOMCAT_HOME/bin/catalina.sh 在“echo “Using CATALINA_BASE: $CATALINA_BASE””上面加入以下行: JAVA_OPTS=”-server -XX:PermSize=64M -XX:MaxPermSize=128m”
Exception in thread ""http-bio-80"-exec-1" java.lang.OutOfMemoryError: PermGen s Exception in thread ""http-bio-80"-exec-1" java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:113)
解决方案: 给tomcat指定的jdk加大启动的内存参数 -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m
一、java.lang.OutOfMemoryError: PermGen space PermGen space的全称是Permanent Generation space,是指内存的永久保存区域, 这块内存主要是被JVM存放Class和Meta信息的,Class在被Loader时就会被放到PermGen space中, 它和存放类实例(Instance)的Heap区域不同,GC(Garbage Collection)不会在主程序运行期对 PermGen space进行清理,所以如果你的应用中有很多CLASS的话,就很可能出现PermGen space错误, 这种错误常见在web服务器对JSP进行pre compile的时候。如果你的WEB APP下都用了大量的第三方jar, 其大小超过了jvm默认的大小(4M)那么就会产生此错误信息了。
解决方法: 手动设置MaxPermSize大小修改TOMCAT_HOME/bin/catalina.sh 在“echo “Using CATALINA_BASE: $CATALINA_BASE””上面加入以下行: JAVA_OPTS=”-server -XX:PermSize=64M -XX:MaxPermSize=128m”
相关文章推荐
- Exception in thread ""http-bio-80"exec-1" java.lang.OutOfMemoryError: PermGen s解决方案
- Exception in thread ""http-bio-80"exec-1" java.lang.OutOfMemoryError: PermGen s解决方案
- Exception in thread ""http-bio-80"exec-1" java.lang.OutOfMemoryError: PermGen s解决方案
- Exception in thread ""http-bio-80"exec-1" java.lang.OutOfMemoryError: PermGen s解决方案
- Exception in thread ""http-bio-80"exec-1" java.lang.OutOfMemoryError: PermGen s解决方案
- Myeclipse运行程序时,发生异常:Exception in thread ""http-bio-8080"-exec-1" java.lang.OutOfMemoryError: PermGen
- Exception in thread ""http-bio-8080"-exec-1" java.lang.OutOfMemoryError: PermGen space Exception in
- Exception in thread "http-bio-8080-exec-11" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8037-exec-45" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8080-exec-13" java.lang.OutOfMemoryError: PermGen space
- 启动tomcat时报错:Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8080-exec-10" java.lang.OutOfMemoryError: PermGen space
- 解决Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8081-exec-3" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8080-exec-8" java.lang.OutOfMemoryError: PermGen space
- eclipse Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space
- Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space