Reputation: 449
I'm trying to increase the amount of PermGen space my application has to avoid some PermGen errors.
I've tried exporting both JAVA_OPTS and MAVEN_OPTS as
-Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
But jconsole still shows the "CMS Perm Gen" maximum to be:
Max: 83,968 kbytes
and the application still runs out of PermGen space when it hits this.
Upvotes: 2
Views: 390
Reputation: 56
have you tried adding those options to your pom - under the surefire plugin configuration as you have to tell surefire about these opts explicitly
<argLine>-Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048m -XX:+CMSClassUnloadingEnabled</argLine>
Upvotes: 4
Reputation: 28736
According your comments you are starting something like cargo plugin. You need to look at the cargo plugin configuration to pass additional VM args, or directly in the script launching tomcat.
The JAVA_OPTS are applied to the launched app when using maven-exec-plugin with goal java
Upvotes: 3