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.

Is adaptive retry meant to catch 429 Too Many Requests errors?

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
timjcommented, Mar 21, 2022

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.

1reaction
beddaricommented, Oct 25, 2022

I fully agree with @timj and this should have been an easy fix. Sad for interop and software quality that it wasn’t.

Read more comments on GitHub >

github_iconTop 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 >

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