The system runs under the jetty plugin in Maven and prompts Outofmemoryerror:permgen space when the eclipse is shipped clean jetty:run.
Workaround:
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
To resolve a failure case:
1. Add maven_opts= "-xms40m-xmx512m-xx:permsize=512m" to the system environment variable.
2. Adding-xms40m-xmx512m-xx:permsize=512m to the Eclipse.ini file is not possible.
3. Run as--->run configuragtions the properties VM arguments under the >jre tab:
-xms512m-xmx1024m
Eclipse has a memory overflow solution using the jetty plugin