You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Since the beginning of this week we are having a problem making requests to bitbucket Cloud. The 11th of October everything was working perfectly, we were doing about 400 requests every time we run hour script. However since Monday the execution gives as a 429 error when only around 130 requests have been done.
Has something changed in the rate limit? maybe we are doing requests to fast? I don't understand why this problem is happening when rate limit is 1000.
Hello @mgnavarrete and thank you for reaching out to Community!
I've reviewed our internal logs for your workspace and it's indeed exceeding the 1000 requests per hour during some periods, which results in the 429 response code you reported.
It's important to note that rate limits are divided into a one-hour rolling window, which means that for every minute that passes, you will be provided that time to run new requests but the total you can run consecutively over an hour is 1,000. With that in mind, you can try reducing the calls per hour ratio to avoid being rate-limited.
As for your questions regarding the OAuth consumers you have in the workspace, since those credentials represent the "workspace user", and the rate-limited is applied at the user level, all the OAuth consumers' API calls sum together to calculate the rate limit.
One alternative would be to use Workspace Access tokens instead, as each token will represent a "bot user" that will have its own rate limit.
Hope that helps! Let me know if you have any questions :)
Thank you, @mgnavarrete !
Thanks you for your answer, I wasn't aware of the Workspace Access tokens and they are very useful for me. However, I still have same problem due to I have more than 1000 repositories and I need to do 1 request per repository in my automation, that means I am going to encounter this very same problem every time regardless what I do.
Is there any way to increment the rate limit for the Workspace Access tokens or for the workspace user? I understand that for normal users it is nor possible because they could collapse the server but workspace user is meant to do automation so 1000 requests is very limitating.
Hello @mgnavarrete ,
I'm afraid it's not currently possible to increase the rate limits are they are in place to grant the stability of the platform for all the users - we have the feature request for that BCLOUD-17723 which you can vote for.
As I mentioned above, if you decide to go with the Workspace Access token, you can create more than one token and divide the calls among them. Each access token represents a separate "bot user" in the workspace, meaning that each token will get its own 1000 requests/hour.
Another alternative, since the rate limits are calculated in a rolling hour window, is to space out the calls to the API on the script/automation you are executing.
Thank you, @mgnavarrete !