Run Button Starts Build 40 minutes later

When I click the run button, a message shows that the build configuration is being added to the build queue... but then nothing happens.

Later in the day I will go back to the build and see that the configuration did get added to the build queue, but ran 40 minutes later.

In the build config history you will see something like Triggered at 11:36 Run at 12:17

Can anyone help with this?

Thanks,

Scott Knowles

7 comments
Comment actions Permalink

The delay in starting the build seems to have to do with the number of snapshot dependencies.

The more snapshots, the longer the delay between the build being triggered and the build starting.

Any assistance with this situation would be appreciated.

Thanks,

Scott Knowles

0
Comment actions Permalink

Hello,

  Please provide more details for your configurations, number of build agents, number of dependencies.
  Are there chances that other build was being built and build agents were busy?

  Regards,
  KIR

0
Comment actions Permalink

There are 37 build configurations.  1 of the build configurations called "Publish" has all of the other projects as snapshot and artifact dependencies.
Publish is the only project that has a VCS build trigger with the checkout rules being "+:."
All the other projects have various number of snapshot and artifact dependencies on each other.  None of these projects have any build triggers, but all have their checkout rules set correctly.

When a check-in happens Publish should try to build.  Since all the other projects are snapshot dependencies, they should all be added to the build queue.
Then based upon the checkout rules and snapshot dependencies between the projects TeamCity should be able to determine which projects to build.

The issue is that when a check-in happens Publish will show Pending, but not start the build.

If the build is kicked off by clicking on the Run button, it will not start for a large amount of time (20 - 40 mins).

There is just 1 build agent and it is not busy.

If you would like some more details I can provide them.

Perforce is the VCS and the build configurations are using the MSBuild runner.

The VCS Root has the default quiet period.

Here is the "Publish" build configuration settings:

General settings edit »
Name: Publish
Description: none
Build number format: {0}, next build number: #164
Artifact paths: none specifed
Fail build if at least one test failed: ON
Execution timeout: disabled
Maximum number of simultaneously running builds: unlimited
Status widget: disabled

Version control settings edit »
VCS checkout mode: Automatically on server
Checkout directory: default
Clean all files before build: OFF
VCS labeling: disabled
Attached VCS roots:
Name Checkout rules Set label
depot Build NO

Runner: MSBuild edit »
Type of runner: MSBuild (Runner for MSBuild files)
Build file path: Build\publish.csproj
Working directory: same as checkout directory
MSBuild version: Microsoft .NET Framework 3.5
Run platform: x86
Targets: Deploy
Command line parameters to MSBuild.exe: none specified
Reduce test failure feedback time: OFF

Build triggering edit »
Build configuration is active (triggering enabled).
Trigger build by vcs check-in: ON
Quiet period: not specified
Trigger patterns:
+:.
Start new build if last build is failed: OFF
Triggering by time: not configured
This configuration depends on: not configured

If you need anymore information, please let me know.

Thanks,

Scott Knowles
0
Comment actions Permalink

Hello Scott,

  When build with snapshot dependencies is started, it first collects/freezes VCS versions for all VCS roots/checkout rules involved to dependencies graph.
  This may be the reason for delayed start.

  To detect exactly what's going on with your configuration, please enable VCS debug logging and send us TeamCity/logs/teamcity-server.log and TeamCity/logs/teamcity-vcs.log logs.

  Thanks,
  KIR

0
Comment actions Permalink

Here are the log files from running the "Publish" configuration with the Run button.

I clicked the run button at 7:32am and the build ran at 7:59 am.

Another strange facet of this problem is that on a check-in, the build kicks off right away.
Only the Run button takes 20 - 40 minutes.

Thanks,

Scott Knowles



Attachment(s):
teamcity-build.log
teamcity-agent.log
teamcity-activities.log
teamcity-server.log
teamcity-vcs.log
0
Comment actions Permalink

Hello Scott,

  According to logs, the build which was build at 7:59 was added to build queue at 7:58.
  That's pretty strange. What is its "Triggered at" value?

  Could you please do the following:

  - enable debug logs on the server
  - install profiling plugin
  - shutdown TeamCity
  - remove TeamCity/logs/* files
  - start teamcity
  - switch on CPU profiling
  - start Publish build manually
  - wait until it starts
  - collect logs from TeamCity/log/teamcity-* + CPU profiling snapshot and send them to us.

  Thanks!

  KIR

0
Comment actions Permalink

Scott, do you still have the same problem? In the logs attached I did not find such long delays when build started manually. Could you please point me to correct date/time when such delay occured so that I can check this in the logs?

0

Please sign in to leave a comment.