1 Replies Last post: Apr 12, 2010 7:21 PM by Sergey Anchipolevsky  
phoeniix Newbie 9 posts since
Sep 11, 2008
Currently Being Moderated

Apr 12, 2010 6:47 PM

Unable to adjust PermSize or MaxPermSize for a build



We are having a problem where we are not able to increase PermSize for a build we are running.  With the addition of more unit tests to an application our PermGen reaches 74M when run from the command line on a local developer workstation.  However the same command run on our TeamCity Agent stays limited to 64M, causing the build to fail.


I have tried specifying the PermSize parameters in the agent.bat file, in the wrapper.conf file and in the build as JVM parameters.  Any ideas what might be forcing the agent to limit PermSize to 64M?


Our build is setup as follows.

Build Runner: Maven2

Goals: clean compile test

Additional Params: -U

JVM command line params: -Xmx512M -Xms128M -XX:MaxPermSize=128M -XX:PermSize=128M -XX:+CMSClassUnloadingEnabled


The error thrown is

org.apache.maven.surefire.booter.SurefireExecutionException: PermGen space; nested exception is java.lang.OutOfMemoryError: PermGen space


Here is our environment

Windows XP x64

TeamCity 4.5.5

Maven 2.0.9



CSA Travel Protection

Sergey Anchipolevsky JetBrains 260 posts since
Jan 22, 2008
Currently Being Moderated
Apr 12, 2010 7:21 PM in response to: phoeniix
Re: Unable to adjust PermSize or MaxPermSize for a build



If you don't fork your surefire tests, specifying additional JVM parameters should help. However if you do fork, use maven.surefire.debug property. See http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html for details.

More Like This

  • Retrieving data ...