Java.lang.OutOfMemoryError:PermGen space and its solution under Eclipse+maven environment

Source: Internet
Author: User

Turn from 71455432

Java.lang.OutOfMemoryError:PermGen Space

The full name of PermGen space is permanent Generation space, which is the permanent storage area of memory. This area of memory is used to store class and meta information, and class, when it is load by the JVM, The class information is placed in the area. Unlike the heap area where the instance is stored, the GC does not clean up the PermGen space while the main program is running.

Internet search for the increase PermGen space can be. Set java_opts= "-xx:permsize=97m-xx:maxpermsize=256m″ before Tomcat's java_opts variable Catalina.bat However, this method did not solve the problem, and later saw an article to solve the solution:
Set the property VM arguments under the Run as--->run configuragtions--->jre tab:
-server-xms512m-xmx1024m-xx:permsize=512m-xx:maxpermsize=512m-xx:+cmsclassunloadingenabled
-xx:+printgcdetails-xloggc:%m2_home%/gc.log-xx:+heapdumponoutofmemoryerror-xx:heapdumppath=%m2_home%/java_ Pid.hprof
The parameters are described as follows:
-xx:+cmspermgensweepingenabled: Allow Permgenspace garbage collection
-xx:+cmsclassunloadingenabled:allows the garbage collector to remove even classes from the memory
-xx:permsize=256m-xx:maxpermsize=256m:raises The amount of memory allocated to the Permgenspace

Java.lang.OutOfMemoryError:PermGen space and its solution under Eclipse+maven environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.