Git fetch command failed with java.lang.OutOfMemoryError

Hi,

I'm trying to make TeamCity build a medium-large project, and it's failing when calling 'git fetch' with java.lang.OutOfMemoryError. I've read about this being possible if checking out on server, but the VCS checkout mode is set to "Always check out files on agent". Before that, it was set to checking out on the server, but I've since changed that. Git version is 1.8.3.1 on the agent machine.

I've tried increasing the maximum memory for the agent from 512MB to 2048MB, but to no avail. Is there anything else I should do, that I didn't consider?

If I'm posting in the wrong place or not following some of the rules, I'll be happy to edit this post, or delete it and post it somewhere else.

3 comments
Comment actions Permalink

Upon further investigation, it seems that the problem is that the files are still being checked out on the server, even though they should be checked out on the agent. I will update this further when I have more information or the solution.

0
Comment actions Permalink

Hello,

Unfortunately there is no exact error in this thread, but it seems that fetch process fails on the server during the process of new changes detection. Usually it means that repository has some large objects in it. If this is the case you need to tune fetch memory options as described in our documentation: https://confluence.jetbrains.com/display/TCD18/Git  (see teamcity.git.fetch.process.max.memory parameter).

0
Comment actions Permalink

Hi,

That was the hint that I needed, thank you! I removed the large objects from the repository and from the history, and everything works fine now.

0

Please sign in to leave a comment.