TeamCity - OutOfMemoryError

Whilst upgrading our TeamCity server from 6.5 to 7.x, I encountered an error:

Unexpected error occurred inside Alarm task: java.lang.OutOfMemoryError: GC overhead limit exceeded

After a bit of looking around and sifting through some very weird articles I was able to find some good information on this. Basically, the JVM starts by default with 512mb of memory and it was struggling to process our 300+ build configurations with this. In order to fix it I had to do the following:

  • Go to TeamCity webserver
  • Open CMD
  • cd <TeamCity root dir>
  • cd bin
  • teamcity7w.exe //ES//TeamCity
    • If you are on TeamCity 6.x then you need to run teamcity6w.exe rather than ..7w
  • This will open the following dialog:

image

Go to the Java tab and change the maximum memory pool entry to something other than 512mb

image

Restart the service and all should be well with the application start-up.

Comments (1) -

Eugene
Eugene
5/21/2012 11:11:45 AM #

Starting from 7.1 TeamCity no longer uses Tomcat-provided windows service wrapper. We moved to our own solution that starts teamcity-server.bat under a service process.

To change memory options you'll need to set environment variable TEAMCITY_SERVER_MEM_OPTS with JVM memory parameters, like -Xmx1024m -XX:MaxPermSize=270m
For more details, see confluence.jetbrains.net/.../Configuring+TeamCity+Server+Startup+Properties

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About Me

 

Web Developer. My most used framework is C# with MVC but use Webforms on occasion. Im an advocate of clean, maintainable code and am very passionate for what I do. Absolutely obsessed with Continuous Integration and how it should be used in every day development scenarios. Trying to move towards a system of Continuous Deployment
Follow Me on Twitter

Jetbrains Academy Member

 

MVB Blogger

 

Friends Of Redgate

Month List