HTTP Status 500-handler processing failed; Nested exception is Java.lang.OutOfMemoryError:PermGen space
Environment information that occurs for this issue:
System: CentOS 6.5
Tomcat:tomcat 7.0.6
PermGen space
PermGen space is the full name of permanent Generation space, refers to the memory of the permanent storage area Outofmemoryerror:permgen space from the surface is the memory benefits, the solution must be to increase memory. Tell me why memory Benefits: This section is used to store class and meta information, and class is placed in the PermGen space area when it is loaded, unlike the heap area where instance is stored, GC (garbage Collection) PermGen space will not be cleaned during the main program's run time, so if your app will load many classes, you will likely have permgen space errors. This error is common when the Web server pre-compile the JSP.
Correction Method:-xms256m-xmx256m-xx:maxnewsize=256m-xx:maxpermsize=256m
2. A outofmemory error occurred while redeploy in Tomcat.
There are several possible reasons for this:
1, Proxool is used because the Proxool contains an older version of Cglib.
2, log4j, better not, just use common-logging.
3, the old version of Cglib, quickly update to the latest version.
4, update to the latest hibernate3.2 3,
Here, for example, the Tomcat environment, other Web servers, such as Jboss,weblogic, are the same reason.
First, Java.lang.OutOfMemoryError:PermGen space PermGen space is the full name of permanent Generation space, refers to the memory of the permanent storage area, This memory is primarily stored by the JVM with class and meta information, and class is placed in PermGen space when it is loader, unlike the heap area where the class instance (Instance) is stored, GC (garbage Collection) PermGen space will not be cleaned up during the main program run time, so if you have many classes in your application, you are likely to have PermGen space errors, which are common when the Web server pre-compile the JSP. 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.
Workaround: Manually set the MaxPermSize size modification tomcat_home/bin/catalina.sh"echo" Using catalina_base: $CATALINA _base ""Add the following line above: java_opts= "-server-xx:permsize=64m-xx:maxpermsize=128m
Recommendation: Move the same third-party jar files to the Tomcat/shared/lib directory, which can reduce the memory consumption of the jar document.
Java.lang.OutOfMemoryError:Java Heap Space Heap Size setting the JVM heap is the setting of the amount of memory space that the JVM can provision during the run of the Java program. The JVM automatically sets the heap when it starts The value of size whose initial space (that is,-XMS) is 1/64 of the physical memory, and the maximum space (-XMX) is 1/4 of the physical memory. You can use options such as the-XMN-XMS-XMX provided by the JVM to set it up. The size of Heap size is the sum of young Generation and tenured generaion. Tip: This exception message is thrown in the JVM if 98% of the time is used for GC and the available heap size is less than 2%. Tip: The Heap Size does not exceed 80% of the available physical memory, generally the-XMS and-XMX options are set to the same, and the-XMX value of-xmn is 1/4.
Workaround: Manually set the heap size to modify tomcat_home/bin/catalina.sh in"echo" Using catalina_base: $CATALINA _base ""Add the following line above: java_opts= "-server-xms800m-xmx800m-xx:maxnewsize=256m"
Third, example, the following gives the parameters of the JAVA JVM in the 1G Memory environment reference: java_opts= "-SERVER-XMS800M-XMX800M-XX:PERMSIZE=64M-XX:MAXNEWSIZE=256M-XX: Maxpermsize=128m-djava.awt.headless=true "
HTTP Status 500-handler processing failed; Nested exception is Java.lang.OutOfMemoryError:PermGen