-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
429 Too many requests or 429 API Rate limit exceeded #546
Comments
+1. |
Based on the Docs
So one thing you can possibly do is reach out to support and see if they can increase the limit for |
+1. Hundreds of domain records (same domain) to manage. |
+1 This happens to me while managing a single large domain (~ 150 records) |
I'm literally blocked here and I don't understand why. Our tf stack is not big by any means. DO has extremely low rate limits everywhere (e.g. using Loki with spaces is impossible). We're getting random API errors from k8s API, spaces API, CDN API returns 50x every so often. It's getting really frustrating. |
Same problem here.
I just tried that. The answer was simply that they are doing this "to protect the platform". So they won't increase the limits. I now asked if they could implement at least something like a burst limit which would allow to overreach the rate limit for a short amount of time. That would probably help with use cases such as Terraform. |
I'm the only one having this problem in a team of three. My coworkers can Since @djmaze and me are hit by this at the same point in time, I wonder if there's something else going on. |
@djmaze works now my limit was reset apparently a few minutes but I'll be keeping an eye. Here's how you can see the rate:
API documentation: https://docs.digitalocean.com/reference/api/api-reference/#section/Introduction/Rate-Limit |
I am getting this reproducibly when running our Terraform plan two times in a row during one or two minutes. The first run works, the second one fails. This was always like this and has not changed for me. |
Posting this here in case anyone else hits the same issue. We're using a remote secrets store (doppler) and the problem was that the entire team and a few apps were using a common token, fetched by the secrets store. |
Today this hit me for the first API request while refreshing terraform state, without me doing anything on DO except a Kubernetes “login”. I saw @tback creating a possible fix for it; any chance it will be released soon? (The last release is from two days before the fix landed) |
We too regularly run into the per-minute rate-limiting of API calls. As such we too would greatly appreciate a solution to this. Be it in the form of an option for increased rate limits on DO's side, the Terraform provider automatically retrying failed calls, or even just adding support for rate limiting to the provider. We'd much prefer a deployment taking a few minutes longer, over it potentially failing. Some background on our use-case, should it help: We regularly spawn on the order of 100 VMs for a few hours at a time, in order to profile distributed applications of ours. These deployments are automated with Terraform. Each VM we provision will lead to multiple API calls, as we also set up DNS records for each, assign it to a project, and so on. As we regularly get rate limited this then requires multiple calls to |
I just installed the provider manually with a provider override and it worked for me as long as it took me to migrate away from DO. |
+1 Would pay extra to not have to worry about rate-limiting the API, which I use to pay provision resources and therefore pay Digital Ocean more money. If there was an option to pay $X/mo for a much higher/unlimited API, I would choose that option at this moment. My other option is to spend time building rate-limiting into my side of the app, which is going to take way more of my time than $X/mo. |
I have similarly filed support requests, as my modestly sized terraform stack is encountering these issues. Unfortunately their own terraform provider isn't usable on their platform. Perhaps if backoff was added to the provider it would slow things down but not impossibly fail? |
I've hit the same problems of rate limits (to the point at which I couldn't even run a single plan anymore) and opened a PR with proposed changes that fixes/mitigate this issue. If anyone would like to take a look at the fork: To try it you just need to install it and do the override as explained in the Hoping to get it into mainstream soon. |
Can you link the PR here too? |
Here: #967 |
Updating here to say that I spent over a week going back and forth with support, and they were not at all helpful. Making me wonder if I should move my DNS elsewhere, if DNS + IAC isn't going to be well supported. |
) * add godo's rate limit configuration to provider * set default rate limit to 240 req/m * docs: add requests_per_second argument * use hashicorp's retryablehttp client on godo * disable rate limiter by default * docs: improve requests per second text * docs: fix and improve http_retry_max description * configs: completely disable retryable client when max retries is 0
We've just released version 2.28.0 of this provider. It adds experimental support for automatically retrying requests that fail with 429 or 500-level response codes. It can be enabled by setting the Please let us know if you have any feedback on this functionality. We will be looking to enable it by default in a future release. Additionally, it adds support for configuring client-side rate-limiting to enforce quality of service. It can be enabled by setting the Thanks to @DanielHLelis for working with us on this! |
Thanks! This seems to be working initially - I'll do more testing and report back. |
That's amazing @DanielHLelis! I've run the last release with 'requests_per_second' parameter and it appears to be working very well. I think that now I can merge all my terraform in one eheh |
I reached the rate limit too, after setting |
With the recently released version 2.30.0 of this provider, we have now enabled retries by default. Setting the |
Terraform Version
Expected Behavior
Terraform to complete successfully
Actual Behavior
Terraform is getting errors back from DO API stating either Too Many Requests or API Rate limit exceeded.
Steps to Reproduce
Manage 100 domain records and it will fail while trying to refresh the state.
Important Factoids
I am managing 10 domains with about 10-20 records each. I have dropped parallelism down to 1 and I still can't get a successful run without hitting one of these two errors. This isn't an absurdly large terraform run, and I am unable to get past just a handful of state refreshes before it errors out.
The text was updated successfully, but these errors were encountered: