Memory issue running build through agent versus stand alone

I currently have a large build that needs quite a bit of memory.  It is a large suite of automated tests.  If I run it from the command line I will do:  set ANT_OPTS=-Xms128m -Xmx512m, and the build will run fine.  It takes under an hour to run.

If I run it through a build agent, however, it will run for hours before I start to see java heap Exceptions in the build log and will never finish.  I have set the same parameters in the Ant Runner page, JVM command line parameters field:   -Xms128m -Xmx512m.  This does appear to allow the build to use the additional memory, but the build still takes hours and eventually results in the heap exceptions.  Are there any other settings or options that would allow this build to run through an agent?  Would upgrading to 4.5 or 5.0 help?  I really do not want to have to run this build manually.

TeamCity        Enterprise Version 4.0 (build 8080)


Any help would be appreciated.  Thank you in advance.
2 comments
Comment actions Permalink

First of all it is important to understand which process requires memory. You are talking about tests, most likely your tests start in separate JVM (fork=true), in this case you should give more memory to this JVM (usually done via <jvmarg/> elements).

0
Comment actions Permalink

The test suite we are encountering the issue with is Webtest.  Webtest is essentially a collection of ant build scripts.  There is no jvmarg element when using the <ant antfile="test.xml"/> task.

0

Please sign in to leave a comment.