Closed nicoleyson closed 5 years ago
Hm, interesting - how many domains are you managing? Just curious at what level this becomes an issue.
It became an issue around 50. At that point I set parallelism to 5, which resolved it temporarily. When it increased to 150 domains, I set parallelism to 3.
We are currently at 470 and now parallelism is set to either 1 or 0 😂 It usually fails when it's refreshing state.
* module.REDACTED_COM.mailgunv3_domain.acquired: mailgunv3_domain.acquired: Error retrieving domain: UnexpectedResponseError URL=https://api.mailgun.net/v3/domains/REDACTED.com ExpectedOneOf=[]int{200, 202, 204} Got=429 Error: max rate reached: retry-in 200ms
Interesting - that's quite a few domains 😀 .
In the AWS case it looks like it was solved by the upstream AWS library: https://github.com/hashicorp/terraform/issues/1051.
I've opened an issue with the upstream library to clarify: https://github.com/mailgun/mailgun-go/issues/199
Oh nice find! When I was digging through the AWS provider issues, they seemed to indicate that it was resolved in the provider.
Thanks! Sorry for the misinformation! I know the maintainer for mailgun-go is super responsive, so I have no doubt this will be resolved soon. Thanks for pushing this forward.
Looks like it'll be on the provider to handle this for the time being - I've got something that I think works, but writing some tests to confirm.
That is amazing!!!! You are a life saver!!! Thank you!!!!!!!!
should be closed with b571775f9492db861b71b8f45d345724ce03bc77, released https://github.com/phillbaker/terraform-provider-mailgunv3/releases/tag/v0.3.2
Awesome!! I'll bump our provider! 🎉 🎉 🎉 🎉 🎉 🎉 🎉 Thank you so so much for handling this. You really saved us.
Confirmed it's working. I took parallelism off 0, so it's defaulting to 10 now, I'd imagine and it's working perfectly. Thank you!!!!
source
I've temporarily resolved this issue by setting
-parallelism=0
but it's slowing down the whole run (e.g. providers that are consuming the mailgun resources such as AWS's route 53 resources)Is there a way to implement a back off / slowdown the number of requests the provider makes since we know what the rate limit is ahead of time? I believe the AWS provider does something similar to avoid hitting the AWS rate limit.