Build Error or Page Not Found for Bitbucket Connected Account

Overview

Bitbucket users may encounter build Error on CircleCI or when clicking job page see Not Found due to API rate limiting. This issue arises when CircleCI exceeds Bitbucket's API request limits for the user, preventing necessary data retrieval for builds. The default rate limit is 1,000 requests per hour per user or access token. This article provides solutions to mitigate these rate limits and ensure smooth CI/CD operations.

Prerequisites

  • Access to Bitbucket and CircleCI accounts.
  • Administrative privileges to manage Bitbucket projects and repositories.
  • CircleCI personal API token.

How to Check If You're Affected

You can quickly test whether your account is being rate limited by running the following curl command:

curl -vvvv --http1.1 -X POST \
  https://circleci.com/api/v2/project/bitbucket/{workspace}/{repository}/pipeline \
  -H 'content-type: application/json' \
  -u "${CIRCLECI_TOKEN}:"

Replace {workspace} and {repository} with your actual Bitbucket workspace and repository names, and ${CIRCLECI_TOKEN} with your CircleCI personal API token.
 
If you're being rate limited, you'll see a response like:

{
  "message": "Your VCS provider has rate limited you."
}

Recommended Workarounds

  1. Use Bitbucket Access Tokens:
  2. Space Out Repository Operations:
    • Avoid pushing to multiple repositories simultaneously to reduce API request volumes.
  3. Limit Project Access per User:
    • Reduce the number of projects a user has access to, ideally fewer than 10 projects, to distribute the API load.
  4. Create Additional Service Accounts:
    • If restructuring project access is difficult, create additional Bitbucket service accounts to distribute API requests across different accounts.

Additional Resources

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.