Java.lang.outofmemoryerror: permgen space and its solution in eclipse + Maven environment

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Transferred from

java.lang.OutOfMemoryError: PermGen space

The full name of permgen space is permanent generation space, which refers to the permanent storage area of memory. This area in memory is used to store class and meta information. When class is loaded by JVM, class information will be put into this area. It is different from the heap area where instances are stored. GC will not clean up permgen space during the main program running

increase permgen space for online search. In the Java of catalina.bat of Tomcat_ Setting Java before opts variable_ OPTS=” -XX:PermSize=97m -XX:MaxPermSize=256m″

however, this method did not solve the problem. Later, I saw an article to solve the problem

set run as — > run configuragtions—> VM arguments under JRE tag:
– server – xms512m – xmx1024m – XX: permsize = 512M – XX: maxpermsize = 512M – XX: + cmsclassunloadingenable
– XX: + printgcdetails – xloggc: – M2_ HOME%/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%M2_ HOME%/java_ PID. Hprof
the parameters are as follows:
– XX: + cmsprmgensweepingenabled: garbage collection of permgenspace is allowed
– XX: + cmsclassunloadingenable: allow the garbage collector to remove even classes from the memory
– XX: permsize = 256M – XX: maxpermsize = 256M: Raise the amount of memory allocated to the permgenspace

Similar Posts: