-
Notifications
You must be signed in to change notification settings - Fork 910
Attempt timeouts causing non-retryable AbortedExceptions #1684
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
Comments
Bump! Is there any update on this @debora-ito? I added a work-around via a custom RetryCondition, but would be awesome if this could be fixed/addressed at the root cause. |
Hi @isaac-jordan sorry for the long pause, I'll take a look at this today or tomorrow. |
I understand the issue, but I'm having trouble to reproduce it. Tweaking the timeout to a very low value is not working for my tests, maybe I need to build a more bulky test case. Still investigating. |
Issue has been raised on aws/aws-sdk-java-v2#1684 that AWS Sdk client returns a non-retryable AbortedExceptions when an API call attempt timeout. This change added a new retry condition where the client will now retry when AbortedException is returned.
HI @isaac-jordan can you provide the full stacktrace of the I was not able to reproduce.
Edit: nevermind, I see you already provided the logs. |
Hi @isaac-jordan thank you for reporting the issue! The SDK should check |
Thanks @zoewangg! We're still using our workaround using a custom retry condition, and haven't had issues with this since then. Obviously nice if it is fixed for everyone/everywhere though :) |
Hey @isaac-jordan - We've also encountered this exception using this library. You've said you're using a custom retry condition. Are you specifically catching the |
We're seeing the same issue after changing this apiCallAttemptTimeout to 1s, it's a low occurence given the volume we do but it does happen regularly. Would be nice to have an update @zoewangg and also interested in the workaround of @isaac-jordan. |
@nickdk We haven't gotten to this issue yet but thanks for reporting that you're also affected. Number of occurrences is a factor in prioritizing our bug fixes. |
|
Expected Behavior
I would expect a
ApiCallAttemptTimeoutException
to be thrown.Current Behavior
After setting a custom value for
ClientOverrideConfiguration.builder().apiCallAttemptTimeout
for a DynamoDB client I began to see occasionalSdkClientException
errors with a message ofUnable to unmarshall response (null). Response Code: 200, Response Text: OK
, and a cause ofAbortedException
.These exceptions are not retried by the SDK, causing my calls to error out completely without following my retry policy (like it would if a
ApiCallAttemptTimeoutException
was thrown). This is causing failures for my service.Logs showing the stack trace internal to the SDK are available here
Possible Solutions
AbortedException
s that are caused by the thread being interrupted when an API call attempt times out and re-throw anApiCallAttemptTimeoutException
.AbortedException
as a retryable exception inSdkDefaultRetrySetting
Steps to Reproduce (for bugs)
This Kotlin snippet manages to reproduce it for me most of the time, since it keeps retrying until it decides to stop (often because of an AbortedException). If this doesn't work for you, try tweaking the
apiCallAttemptTimeout
until you see anAbortedException
.Note that I can also reproduce this more reliably by setting a very low timeout (e.g. 2ms), but that's definitely a more artificial test (but should also be fixed).
Context
This is causing regular 500s in my service because the
SdkClientException
s are not retried, despite being a scenario that should be retried (an attempt timeout).I'm considering adding a custom
RetryCondition
to check forSdkClientException
caused byAbortedException
, but let me know if the real fix is on the way (or if this suggested workaround isn't appropriate for some reason).Your Environment
The text was updated successfully, but these errors were encountered: