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

Treat "connection reset" errors as retryable. #298

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

nelhage
Copy link
Contributor

@nelhage nelhage commented Jun 14, 2021

Per
aws/aws-sdk-go#2926 (comment),
the upstream SDK doesn't retry connection reset errors on reads,
because at that point we can't tell if the server has already applied
the operation.

For S3 operations, I think pretty much all requests should be safely
idempotent, so I think we should retry these errors.

I saw some of my own long-running jobs fail this weekend due to
network weather and some dropped connections that s5cmd did not retry,
which I found very surprising.

Per
aws/aws-sdk-go@c3d2710,
the strings.Contains check does seem to be the best way to check for
this error.

This might fix #294, or there might be something deeper going on there.

Per
aws/aws-sdk-go#2926 (comment),
the upstream SDK doesn't retry connection reset errors on reads,
because at that point we can't tell if the server has already applied
the operation.

For S3 operations, I think pretty much all requests should be safely
idempotent, so I think we should retry these errors.

I saw some of my own long-running jobs fail this weekend due to
network weather and some dropped connections that s5cmd did not retry,
which I found very surprising.

Per
aws/aws-sdk-go@c3d2710,
the `strings.Contains` check does seem to be the best way to check for
this error.
@nelhage nelhage requested a review from a team as a code owner June 14, 2021 16:34
@nelhage nelhage requested review from igungor and ilkinulas and removed request for a team June 14, 2021 16:34
@igungor igungor merged commit 688f8e5 into peak:master Jun 16, 2021
@igungor
Copy link
Member

igungor commented Jun 16, 2021

Thank you.

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

Successfully merging this pull request may close these issues.

Got "read: connection reset by peer" error when using version 1.0.0+
2 participants