"Checking for changes" step is extremely slow (using TFS)

The "Checking for changes" step is very slow in our builds. We are using TFS and the repositories are hosted off-site (and out of state) so I can understand some slowness there. However this step is routinely taking 15m+ and TFS responds pretty quick from Visual Studio so I can't understand why this is taking so long.

Is there a way to get any more details on what is happening during this step? Anyway to pinpoint exactly what is taking so long?

Note: I am running the latest TeamCity 5.1.2 release.

8 comments

How much time does it takes in VS to see the changes of entire project?

Do you use TFS proxy?

Could you please try profiling the .NET utility that collects changes from TFS? To do this, please:
- open <TeamCity server insall path>/webapps/root/web-inf/plugins/tfs/server/tfs-server.jar
- extract bin folder from the archive
- in the folder you'll find tfs-native.exe file.
- please run tool  with following commandlines:

tfs-native.exe http://<tfs server>:<port>/<relpath> /user:<username> /password:<password> result.txt GetCurrentVersion

tfs-native.exe http://<tfs server>:<port>/<relpath> /user:<username> /password:<password> result.txt CollectBuildChanges $/<checkout path> <revision>

where <revision> is the revision of a changeset from the project that was checked in 1-2 days ago.

To create profile snapshot, I would recommend to use dotTrace http://www.jetbrains.com/profiler/
You may download this tool and get a free trial.

Please attach build server VCS debug logs as described at http://confluence.jetbrains.net/display/TCD5/Reporting+Issues

0

When I run the 'CollectBuildChanges' step that you described I'm getting the following:

C:\Documents and Settings\joshua_poehls\Desktop\tfs-server\bin>tfs-native.exe ht
tp://usdb204:8080 result.txt CollectBuildChanges $/MIMS/MimsWeb/dev 64100
TFS Native Verifier v5.1 Copyright (C) 2006-2010 JetBrains s.r.o.
INFO  - Use Tfs from JetBrains.TeamCity.Tfs.Tfs10Accessor
TFS Native Accessor v5.1 Copyright (C) 2006-2010 JetBrains s.r.o.
INFO  - Connecting to server http://usdb204:8080
WARN  - No /hash: key specified. This will cause TFS workspaces issues.
ERROR - Index was outside the bounds of the array.
System.Exception: Index was outside the bounds of the array. ---> System.IndexOu
tOfRangeException: Index was outside the bounds of the array.
   at JetBrains.TeamCity.Tfs.CommandLineParser.Next() in c:\Agent\work\bf3e38e92
37c2e2\TfsNativeAccessor\src\CommandLineParser.cs:line 17
   at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\bf3e38
e9237c2e2\TfsNativeAccessor\src\Program.cs:line 124
   --- End of inner exception stack trace ---
   at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\bf3e38
e9237c2e2\TfsNativeAccessor\src\Program.cs:line 296



Do I need to run that tfs-native.exe from a specific directory on the build server? I just extracted the JAR file to my desktop and ran it from there for this test.
0

Please attach commandline arguments you tried.

0

Here is what I typed in, verbatim, at the command line:

tfs-native.exe http://myserver:8080 result.txt CollectBuildChanges $/path/to/code 64100

0

What you missed was 'c' and the end of commandline. Feel free to runt tfs-native.exe without parameters to see commandline options.

0

Hi I have experiment the same trouble, mi root in TFS has a space and the command is like these:

tfs-native http://myserver:8080/tfs/CajaPaitaCore /user:user /password:password result.txt CollectBuildChanges $/SysONE/DEV/Team 01/Dev01/SysOne/Core 2940

but in the tfs folder path there is a space, how pass this to tfs-native, i try with " and ' i have this error:

TFS Native Verifier v6.0 Copyright (C) 2006-2011 JetBrains s.r.o.
INFO  - Use Tfs from JetBrains.TeamCity.Tfs.Tfs10Accessor
TFS Native Accessor v6.0 Copyright (C) 2006-2011 JetBrains s.r.o.
INFO  - Connecting to server http://dev12802:8080/tfs/CajaPaitaCore
WARN  - No /hash: key specified. This will cause TFS workspaces issues.
ERROR - Index was outside the bounds of the array.
System.Exception: Index was outside the bounds of the array. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at JetBrains.TeamCity.Tfs.CommandLineParser.Next() in c:\Agent\work\7b38d9d0edb21a5b\TfsNativeAccessor\src\CommandLineParser.cs:line 17
   at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\7b38d9d0edb21a5b\TfsNativeAccessor\src\Program.cs:line 124
   --- End of inner exception stack trace ---
   at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\7b38d9d0edb21a5b\TfsNativeAccessor\src\Program.cs:line 349


teamcity version is: 6.5.2 build 17935, soon i will upgrade to the last version

best regards

0

Hello,

Thanks for the answer. Please try newer (7.0 or 7.1) build and let me know if it works for you.

0

Hello,
I have upgrade to 7.0.4, and now some builds run very smooth but i have some observations about the process:


1. when i configure exceptions in the checkout rules section, i mean teamcity has to ignore some paths, the checking updates take a very long time, i will change the repository configuratio to avoid this issue.
2. when i delete temp data and work data in the agent, the negotiation between server and agent take his time, when i think must apply the changes unless there are some other things to happen, and this negotitiation (data interchange) between server - agent take some time when i check clean all... i suppose this delete data and download data fro mthe vcs, but maybe it does anything else but i dont know...

finally team City its a great product, your has done an amazing job, thanks a lot!!!




uZi

0

Please sign in to leave a comment.