Pergunta

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.

Foi útil?

Solução

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>

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top