-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support retrying S3 connection resets on GetObject body #1242
Comments
Hello @mbh621, thank you for reaching out to us. I would suggest using the |
One way i think the SDK could implement this functionality is to add support for an intermediate reader that would keep track of the bytes read by the user. When a error occurs internally it could do another GetObject request, but using byte range to start where it had left off. I imagine that the retry could would be configurable. I think this would be the best strategy for implementing this feature. |
@xibz (Several year late to this, my apologies!) one of the downsides of If |
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. |
I don't think anything has changed that obviates or resolves this issue. |
If a "connection error" reset is encountered while reading a s3 object attempt to restart the connection and resume read at the current offset. This solves a bug found when trying to ingest several s3 hosted log files: several files will stop ingesting with the error "connection reset by peer". There seems to be a curious behavior of the s3 service that happens when a single session maintains numerous long-running download connections to various objects in a bucket- the service appears to reset connections at random. See: aws/aws-sdk-go#1242 Closes #2005
If a "connection error" reset is encountered while reading a s3 object attempt to restart the connection and resume read at the current offset. This solves a bug found when trying to ingest several s3 hosted log files: several files will stop ingesting with the error "connection reset by peer". There seems to be a curious behavior of the s3 service that happens when a single session maintains numerous long-running download connections to various objects in a bucket- the service appears to reset connections at random. See: aws/aws-sdk-go#1242 Closes #2005
If a "connection error" reset is encountered while reading a s3 object attempt to restart the connection and resume read at the current offset. This solves a bug found when trying to ingest several s3 hosted log files: several files will stop ingesting with the error "connection reset by peer". There seems to be a curious behavior of the s3 service that happens when a single session maintains numerous long-running download connections to various objects in a bucket- the service appears to reset connections at random. See: aws/aws-sdk-go#1242 Closes #2005
If a "connection error" reset is encountered while reading a s3 object attempt to restart the connection and resume read at the current offset. This solves a bug found when trying to ingest several s3 hosted log files: several files will stop ingesting with the error "connection reset by peer". There seems to be a curious behavior of the s3 service that happens when a single session maintains numerous long-running download connections to various objects in a bucket- the service appears to reset connections at random. See: aws/aws-sdk-go#1242 Closes #2005
Closing this issue, per the messaging here we do not intend to add support for automatically retrying connection reset errors when reading response bodies. Further details can be found in this issue thread: #2926 (comment) We would be welcome to contributions that add an configurable mechanism to the retryer implementation that allows customers to override this particular behavior, that they could then opt-in to. |
|
Version of AWS SDK for Go?
1.8.19 (latest version)
Version of Go (
go version
)?1.8
What issue did you see?
Connection reset by peer when reading the body of a s3.GetObjectOutput. I'd expect the SDK to be capable of retrying connection resets.
The problem is the REST unmarshal handler just sets
GetObjectOutput.Body
's toHTTPResponse.Body
without reading the data.Request.Send()
will then return successfully, but an error may still occur when the caller tries to readGetObjectOutput.Body
. This error occurs outside of the AWS SDK's logic. Therefore, consumers can't take advantage ofRequest
's retry logic.Steps to reproduce
I don't have a code snippet, but this is easily reproducible if you put a decent load on an S3 bucket. It's common for S3 to reset the connection while reading the
GetObjectOutput.Body
body. See AWS support's response to this thread https://forums.aws.amazon.com/thread.jspa?threadID=111195.The text was updated successfully, but these errors were encountered: