Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have problems with some configuration of my TeamCity project. I'm trying to build an application in order to run its Unit Tests, but i can't.

It seems that my project have problems to get the source from git, which is a private repo:

Build 'Myproject :: Build Myproject' #15 
Started 'Fri Jun 29 12:41:28 EDT 2012' on 'Default Agent' by 'you'
Finished 'Fri Jun 29 12:41:47 EDT 2012' with status 'ERROR Unable to collect changes'
TeamCity URL 
TeamCity server version is 7.0.3 (build 21424)

[12:41:29]: bt2
[12:41:29]: Checking for changes
[12:41:47]: Failed to start build
[12:41:47]: Failed to collect changes, error: 'git fetch' command failed.
stderr: java.lang.OutOfMemoryError: Java heap space
    at org.eclipse.jgit.transport.PackParser.resolveDeltas(
    at org.eclipse.jgit.transport.PackParser.resolveDeltas(
    at org.eclipse.jgit.transport.PackParser.resolveDeltas(
    at org.eclipse.jgit.transport.PackParser.parse(
    at org.eclipse.jgit.transport.PackParser.parse(
    at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(
    at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(
    at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(
[12:41:47]: Build finished

As you can see, is alerting about Java Out of Memory, but it doesn't make sense because its running with at least 1300MB of heap size.

share|improve this question

It seems that was a problem with the JAVA heap size or memory options at startup TeamCity.

I had to set the following environment variables:

export TEAMCITY_SERVER_MEM_OPTS="-Xmx1300m -XX:MaxPermSize=270m"
export TEAMCITY_SERVER_OPTS="-Dteamcity.git.fetch.separate.process=false"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.