Adventures of a wannabe geek!

Ranting within

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:


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


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