question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BitbucketCloudApiClient.executeMethod hangs the build

See original GitHub issue

Your checklist for this issue

  • Jenkins version

  • Plugin version

  • Bitbucket cloud

  • Bitbucket server and version

Description

Jenkins: 2.217 Plugin: 2.6.0 Bitbucket: cloud

Since a couple of days ago almost all our builds hang before even printing anything.

Screen Shot 2020-01-27 at 5 15 39 PM

The only thing I could find initially was when I cancel the hanged build it shows this message:

Branch event
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.executeMethod(BitbucketCloudApiClient.java:858)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequestAsInputStream(BitbucketCloudApiClient.java:885)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:909)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getAllBranches(BitbucketCloudApiClient.java:1029)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getBranchesByRef(BitbucketCloudApiClient.java:484)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getBranches(BitbucketCloudApiClient.java:474)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:791)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:299)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:428)
Finished: FAILURE

Screen Shot 2020-01-27 at 5 16 03 PM

Then I added a Logger for com.cloudbees.jenkins.plugins.bitbucket and it keeps printing this line over and over

Jan 27, 2020 11:10:42 PM FINE com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient
Bitbucket Cloud API rate limit reached, sleeping for 5 sec then retry...

To me, it seems like the build is hanging on trying to get the Jenkinsfile from bitbucket. Not sure why we suddenly reached the limit, because we are not building more PR than usual. Could Bitbucket now consider retry as a request toward the limit?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
jetersencommented, Jan 28, 2020

I still think fix the PR #277 adds value even though they plan to roll it back 😆

4reactions
dblanchettecommented, Jan 28, 2020

I also have a support case open and got a reply:

We have recently made changes to our API rate limit for repository Refs, to be in line with our API limits are documented here: https://confluence.atlassian.com/bitbucket/rate-limits-668173227.html so all authenticated calls per user per hour to the repository endpoint are limited to 1k an hour. Our Dev team is working to revert those changes and increase the limit for branches endpoint calls. Once those changes are rolled out later today you shouldn’t be facing this again with Bitbucket, apologies for this inconvenience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jenkins hangs between build and post-build - Stack Overflow
Job itself is finished within 5 minutes (same as before), then it hangs for 5-10 minutes before moving on. I managed to narrow...
Read more >
[JENKINS-58810] Failed to notify status of build to bitbucket in ...
Failed to notify status of build to bitbucket in Multibranch pipeline and to trigger build from bitbucket when code pushed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found