How to deal with “java.lang.OutOfMemoryError: PermGen space” error?
Common mistakes people make is thinking that heap space and permgen space are same, which is not at all true. You could have lot of space remaining in the heap but still can run out of memory in permgen.
Common causes of OutofMemory in PermGen is ClassLoader. Whenever a class is loaded into JVM, all its meta data, along with Classloader, is kept on PermGen area and they will be garbage collected when the Classloader which loaded them is ready for garbage collection. In Case Classloader has a memory leak than all classes loaded by it will remain in memory and cause permGen outofmemory once you repeat it a couple of times. The classical example is Java.lang.OutOfMemoryError:PermGen Space in Tomcat.
Now there are two ways to solve this:
1. Find the cause of Memory Leak or if there is any memory leak.
2. Increase size of PermGen Space by using JVM param -XX:MaxPermSize and -XX:PermSize.
You can also check 2 Solution of Java.lang.OutOfMemoryError in Java for more details.
Refer to:
Some Useful -XX Options
Default values are listed for Java SE 6 for Solaris Sparc with -server. Some options may vary per architecture/OS/JVM version. Platforms with a differing default value are listed in the description.
Boolean options are turned on with -XX:+<option> and turned off with -XX:-<option>.
Numeric options are set with -XX:<option>=<number>. Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes (for example, 32k is the same as 32768).
String options are set with -XX:<option>=<string>, are usually used to specify a file, a path, or a list of commands
分享到:
相关推荐
java.lang.OutOfMemoryError: PermGen space 解决方案
Caused by: java.lang.OutOfMemoryError: PermGen space解决方案, avax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space at org.apache.jasper.servlet.JspServlet.service(JspServlet.java...
java.lang.OutOfMemoryError: PermGen space及其解决方法,解决项目太大tomcat内存溢出
java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: Java heap space 解决方法
Tomcat给我的java.lang.OutOfMemoryError: ... PermGenTomcat给我的java.lang.OutOfMemoryError: PermGenTomcat给我的java.lang.OutOfMemoryError: PermGenTomcat给我的java.lang.OutOfMemoryError: PermGen
搜集整理关于java错误处理:java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space 资料整理
tomcat内存溢出解决办法,错误信息:java.lang.OutOfMemoryError:PermGen space 参考该文档可快速解决内存溢出的问题,服务器:tomcat
报错 java.lang.OutOfMemoryError: PermGen space 报错 java.lang.OutOfMemoryError: Java heap 启动报错java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler JAVA_OPTS="-server -Xms800m ...
Eclipse中通过Tomcat运行J2EE项目java.lang.OutOfMemoryError PermGen space的解决方案
解决OutOfMemoryError: PermGen space,过程是痛苦的,结果是舒畅的
NULL 博文链接:https://geyubin.iteye.com/blog/779330
记录java.lang.OutOfMemoryError:Java heap space的情况 文章内容: 一.问题描述+原因分析+解决方案 二.JVM调优说明 三.Tomcat添加到jvisualvm监控
Myeclipse下java.lang.OutOfMemoryError Java heap space的解决
Tomcat内存溢出的解决方法(java.util.concurrent.ExecutionException:java.lang.OutOfMemoryError),内附解决方案!
java.lang.OutOfMemoryError: Java heap space 解决方法
java.lang.OutOfMemoryError处理错误
编译时出现java.lang.OutOfMemoryError Java heap space异常.