无法在TeamCity中运行构build

我的TeamCity项目的一些configuration有问题。 我试图build立一个应用程序来运行其unit testing,但我不能。

似乎我的项目有问题,从git,这是一个私人回购的来源:

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 http://ieditedthispart.compute-1.amazonaws.com:8111/viewLog.html?buildId=16&buildTypeId=bt2 TeamCity server version is 7.0.3 (build 21424) [12:41:29]: bt2 [12:41:29]: Checking for changes [12:41:47]: [PREPARATION_FAILURE_TYPE] [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.storage.pack.BinaryDelta.apply(BinaryDelta.java:163) at org.eclipse.jgit.storage.pack.BinaryDelta.apply(BinaryDelta.java:118) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:561) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:544) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:507) at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:462) at org.eclipse.jgit.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:178) at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:410) at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:649) at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:280) at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:64... [12:41:47]: Build finished 

正如您所看到的,正在警告Java内存不足,但是它没有意义,因为它的运行至less有1300MB的堆大小。

这似乎是在启动TeamCity的JAVA堆大小或内存选项的问题。

我不得不设置下面的环境variables:

 export TEAMCITY_SERVER_MEM_OPTS="-Xmx1300m -XX:MaxPermSize=270m" export TEAMCITY_SERVER_OPTS="-Dteamcity.git.fetch.separate.process=false"