TeamCity stuck in Source Update on one Git repository

I just installed TeamCity 8.0 on Windows to create projects (Visual Studio solutions) in four different Git repositories. It works as expected on three of them, but one at a time it gets stuck in update sources. The settings for the four VCS roots are identical (except for the Git repo fetch URLs).

All TeamCity projects use server-side validation.

The build log for the problematic project contains

[15:36:34]: bt1 (works for 41m: 38s)

[15:36:34]: Check for changes (performed for 41m: 37s)

[15:36:37]: Publishing internal artifacts

[15:36:38]: [Publishing internal artifacts] Submitting the build.start.properties.gz file

[15:36:37]: Clearing the temporary directory: C: \ TeamCity \ buildAgent \ temp \ buildTmp

[15:36:37]: Checkout: C: \ TeamCity \ buildAgent \ work \ 62d0281b7178c739

[15:36:37]: Update sources: server-side verification (works for 41 m: 34 s)

[15:36:38]: [Updating sources] Performs a clean design. Reason: the agent does not have versions of the project sources.

[15:36:38]: [Updating sources] Creating and caching a clean patch for VCS root: git @ qa.company.com: Company.WebSite.git # master

Using Process Monitor in the build agent, I see that it clogs the next folder using ReadFile operations.

C: \ ProgramData \ JetBrains \ TeamCity \ system \ caches \ git \ GIT-11F9493A.git \ Objects \ package \ pack 1490ccc8f7896ab876413465c4b48e87448bed35.pack

This .pack file is about 300 MB in size, which I assume is the same size as the Git repository.

I tried to delete this folder and run the TeamCity build agent again and create the Windows server services, but it just recreates and then TeamCity clogs it again.

Are there any other recommendations for resolving this issue?

+6
source share
3 answers

I crossed this on the TeamCity forum and got an answer there.

TeamCity has a default limit for each file of 128 MB; if your repo has any files that were or were more than this limit, then the repo clone does not work.

We have a SQL script in our repo, which is about 200 MB in size.

It was fixed to set an internal parameter in TeamCity to increase this limit:

teamcity.git.stream.file.threshold.mb=256

+4
source

The script in the accepted answer is not applicable to me. I was able to solve the problem by simply creating a new VCS root for the same repo and binding it to my build configuration.

+5
source

Use the Enforce Clean Checkout option in the Build Configuration Actions menu.

TeamCity - forced cleanup Checkout

The next time you run the assembly, it will re-create the local git repository and return to normal operation.

+2
source

Source: https://habr.com/ru/post/953711/


All Articles