Is adaptive retry meant to catch 429 Too Many Requests errors?
See original GitHub issueDescribe the bug
We have a client configured with retries={"mode": "adaptive", "max_attempts": 10}
In some situations we are seeing the following response:
DEBUG botocore.retries.standard (standard.py:90) - Not retrying request.
<stack trace>
botocore.exceptions.ClientError: An error occurred (429) when calling the GetObject operation: Too Many Requests
The implication is that for standard retries http error 429 (Too Many Requests) is not handled. Am I reading things correctly? Am I meant to do backoff retry myself?
botocore/data/_retry.json
does list 429:
"too_many_requests": {
"applies_when": {
"response": {
"http_status_code": 429
}
}
},
but does that not apply to adaptive retries?
Sorry if I’ve missed some documentation.
Expected behavior
Sorry if I’ve missed some documentation. Is there some configuration I’m meant to set to enable retries? 429 Too Many Requests seems like it’s something that should be handled automatically by the retry infrastructure.
Debug logs
I enabled debug logging and it reports “Not retrying request”.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Let's Try Again: Making Retries Work With Cloud Services
This article reviews the basics of retries as a failure handling ... 6585 defines a directly suitable alternative, 429 Too Many Requests.
Read more >How to Fix 429 Too Many Requests Error - Kinsta
The HTTP 429 error is returned when too many requests are made to a page within a short period of time. Find out...
Read more >429 Too Many Requests - HTTP - MDN Web Docs
The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time...
Read more >Retry strategy | Cloud Storage
When you receive a retryable response, you should consider the idempotency of the request, because retrying requests that are not idempotent can lead...
Read more >Status Code 429 Too Many Requests - Zapier
ProblemZapier has made too many requests to the app account it's trying to connect to. The Zap is likely asking for or sending......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am using botocore in some code that connects directly to the bucket. Lambda is not involved.
I do not understand why you can’t add 429 to the retry list explicitly. It won’t harm anyone and will help Google users. Given the conversation on this ticket I have to abandon using botocore on Google and am rewriting my client to use google-cloud-storage APIs directly.
I fully agree with @timj and this should have been an easy fix. Sad for interop and software quality that it wasn’t.