Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54983

Hitting Bitbucket API Rate limit quite easily

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins ver. 2.138.1
      Bitbucket Branch Source Plugin 2.2.12

      For a while our branching indexing took a while to finish and now I decided to look into why. The console output isn't very helpful so I had to stumble into a rather random log message from com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient. It says:

      "Bitbucket Cloud API rate limit reached, sleeping for 5 sec then retry..."

      So I figured this was the issue. If I put in a new user, the indexing is fast for some time, then it slows down and the log messages reappear so this sort of confirms my suspicion. 

      We have a repo with ~300 branches that is periodically scanned every 5 minutes. 

      I looked at the rates at https://confluence.atlassian.com/bitbucket/rate-limits-668173227.html - Only three categories are limited to 1000 per hour but to me neither of them looks like it would limit checking of branch SHA's.

      Can somebody verify whether or not the branching is using the optimal calls to get branch SHA's?

      I have tried to see if I could figure out which HTTP(S) requests are used but I can't find anything useful in the logs.

       

            Unassigned Unassigned
            mathiasi Mathias Immerkær
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: