Skip to content
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

Retry IOException and http status >= 500 #180

Open
mrichards42 opened this issue Apr 1, 2021 · 0 comments
Open

Retry IOException and http status >= 500 #180

mrichards42 opened this issue Apr 1, 2021 · 0 comments

Comments

@mrichards42
Copy link

mrichards42 commented Apr 1, 2021

Dependencies

                 [com.cognitect.aws/api "0.8.505"]
                 [com.cognitect.aws/endpoints "1.1.11.976"]
                 [com.cognitect.aws/s3 "811.2.865.0"]

Description

Since switching from the Java SDKs, I've noticed an increase in the number of API calls that result in failures. The majority of errors I've seen (IOException and http status 500) are considered retriable by the Java SDK, but in this library are marked :cognitect.anomalies/fault, which isn't retried by default.

This issue is similar to #162 and #79, but should provide more information.

I understand that I can handle this by using a custom retriable? function, but I hope you'll consider retrying at least 500 and 502 statuses, and IOException by default. Thanks!

Retriable conditions

Exceptions

The Java SDK retries all IOExceptions (source).

HTTP status codes

The Java SDK retries the following http statuses: 500, 502, 503, 504 (source), while the JS SDK retries statuses >= 500 (source).

Error codes

Error codes are, unfortunately, a little less consistent between the Java and JS SDKs, so I understand that these might be out of scope. For the sake of completeness, this is what I've gleaned from the two SDKs:

Codes retried by both Java and JS SDKs
EC2ThrottledException
ProvisionedThroughputExceededException
RequestLimitExceeded
RequestThrottled
RequestThrottledException
Throttling
ThrottlingException
TooManyRequestsException
TransactionInProgressException

These are ClockSkew errors, and are retried by default in Java, but not JS

AuthFailure
InvalidSignatureException
RequestExpired
RequestInTheFuture
RequestTimeTooSkewed
SignatureDoesNotMatch
Codes retried by only the Java SDK
BandwidthLimitExceeded
PriorRequestNotComplete
RequestTimeout
RequestTimeoutException
SlowDown
ThrottledException
Codes retried by only the JS SDK
ExpiredTokenException
NetworkingError
TimeoutError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant