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

aws/request: Default Retryer does retry request body timeouts #1275

Closed
RendijsSmukulis opened this issue May 16, 2017 · 2 comments
Closed

aws/request: Default Retryer does retry request body timeouts #1275

RendijsSmukulis opened this issue May 16, 2017 · 2 comments
Labels
bug This issue is a bug.

Comments

@RendijsSmukulis
Copy link

Version of AWS SDK for Go?

Release v1.6.2 (2016-12-08)

Version of Go (go version)?

go1.8 windows/amd64

What issue did you see?

We've seen a number of failures when sending batches to Firehose that should have been retried, but were not.
Error in the logs:

SerializationError: failed decoding JSON RPC response
caused by: net/http: request canceled (Client.Timeout exceeded while reading body)

My understanding is that this is caused by the timeout happening during the serializer reading the response body. If I simulate a response timing out by not even sending headers, I get this error:

RequestError: send request failed
caused by: Post http://localhost:5454//: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

which is retried by the Retryer logic.

Currently, retryer.go does not include the SerializationError in the retryableCodes map (as seen here), so either the SerializationError needs to be added to the Retryer's retryableCodes map, or the underlying code should throw RequestTimeout, not SerializationError when a read of response's body takes too long.

@jasdel
Copy link
Contributor

jasdel commented May 16, 2017

Thanks for the heads up on this @RendijsSmukulis I think this is an extension of logic added a few weeks ago to retry connection resets. I think we can add a case to the SDK's retrier logic to catch this case.

@jasdel jasdel added the bug This issue is a bug. label May 16, 2017
@jasdel jasdel changed the title Default Retryer does not always retry on request timeout. aws/request: Default Retryer does retry request body timeouts May 16, 2017
jasdel added a commit to jasdel/aws-sdk-go that referenced this issue May 19, 2017
Adds support for retrying temporary errors that occur during
unmarshaling of a request's response body.

Fix aws#1275
jasdel added a commit that referenced this issue May 19, 2017
…hal (#1289)

Adds support for retrying temporary errors that occur during
unmarshaling of a request's response body.

Fix #1275
@jasdel
Copy link
Contributor

jasdel commented May 19, 2017

Hi @RendijsSmukulis Thanks for letting us know about this issue. I just merged in #1289 which adds support for retrying temporary error such as Client.Timeout that occur when the SDK is reading the response body. Let us know if you run into any additional issues, or have feedback.

@awstools awstools mentioned this issue May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants