Delay between Bitbucket Server commit and Bamboo build

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

If you have Builds and Branches triggered by repositories, they may be delayed with no error showing in the logs.

Diagnosis

Diagnostic Steps

  1. Add DEBUG logging for the following classpaths, from Administration >> Overview >> Log settings:

    • com.atlassian.bamboo.plugins.stash.events.BranchChangedEventListener

    • com.atlassian.bamboo.plan.PlanExecutionManagerImpl

    • com.atlassian.bamboo.chains.ChainExecutionManagerImpl

  2. Check the timestamps from the Commit to Change Detection, for example:

    1 2 3 4 5 6 7 2017-01-19 13:09:49,777 INFO [http-nio-8085-exec-384] [AuthenticatorImpl] Authenticated app 'Stash:#######' as user 'null' successfully 2017-01-19 13:09:49,777 INFO [http-nio-8085-exec-384] [AccessLogFilter] 127.0.0.1 POST <bamboo-url>/rest/remote-event-consumer/latest/events/stash-branch-changed-remote-event 2794562kb 2017-01-19 13:09:49,778 INFO [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-6] [BranchChangedEventListener] Received stash ref changed event [ <branch>, master] 2017-01-19 13:09:49,781 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-6] [BranchChangedEventListener] publishing change detection event for <plan-key> ... 2017-01-19 13:27:53,593 DEBUG [9-BAM::PlanExec:pool-16-thread-1] [PlanExecutionManagerImpl] Plan: <plan-key> about to run change detection for <plan-key> on repositories [107282444] 2017-01-19 13:27:54,502 INFO [9-BAM::PlanExec:pool-16-thread-1] [GitCommandProcessor] from revision: [<commit-hash>]; to revision: [<commit-hash>]

Cause

This can be caused by other triggers existing on builds. Specifically, having the Repository polling trigger on Plans and Branches can add significant time because it will run once for each plan and branch for every plan and branch which has it configured.

Solution

Resolution

Please avoid using the Repository polling trigger if you use other triggers.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.