Reprinted from: http://greemranqq.iteye.com/blog/1705867
Reprinted from: http://www.cnblogs.com/xwdreamer/archive/2011/11/21/2296930.html
Java code
- Exception in thread "Containerbackgroundprocessor[standardengine[catalina]"
Java code
- Java.lang.OutOfMemoryError:PermGen Space
Java code
- Reason:
- The full name of PermGen space is permanent Generation space,
Java code
- Refers to the memory's permanent storage area, which is primarily stored by the JVM with class and meta information,
Java code
- Class is placed in PermGen space when it is loader,
Java code
- It differs from the heap area where the class instance (Instance) is stored, GC (garbage Collection)
Java code
- PermGen space is not cleaned during the main program run time, so if you have many classes in your application,
Java code
- PermGen space errors are most likely to occur when the Web server pre-compile the JSP.
Java code
- If you have a large number of third-party jars under your web app that are larger than the JVM's default size (4M), this error message will be generated.
Java code
- Workaround 1:
- Manually set the MaxPermSize size, if it is a Linux system, modify the tomcat_home/bin/catalina.sh, if it is a Windows system, modify Tomcat_home/bin/catalina.bat,
- Add the following line to the "Echo " Using catalina_base: $CATALINA _base "":
- Java_opts= "-server-xx:permsize=64m-xx:maxpermsize=128m
Workaround 2
Java code
- Modify the Eclipse.ini file and modify the following:
- -vmargs
- -dosgi.requiredjavaversion=1.5
- -xms128m
- -xmx512m
- -xx:permsize=64m
- -xx:maxpermsize=128m
- If also reported is wrong, you can consider the following changes
- -vmargs
- -dosgi.requiredjavaversion=1.5
- -xms512m
- -xmx1024m
- -xx:permsize=256m
- -xx:maxpermsize=512m
Exception in Thread "Thread-12751" Java.lang.OutOfMemoryError:PermGen space