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

Resource should retry on ECONNRESET #25

Open
xoebus opened this issue Jul 31, 2019 · 6 comments
Open

Resource should retry on ECONNRESET #25

xoebus opened this issue Jul 31, 2019 · 6 comments

Comments

@xoebus
Copy link
Contributor

xoebus commented Jul 31, 2019

stemcell-econnreset

It looks like we used to retry on this error but commit 889a220 accidentally broke this as ECONNRESET is not temporary or a timeout.

I'm not 100% sure that the error will bubble up to the client as syscall.ECONNRESET but should we retry more aggressively on all error types anyway?

@vito
Copy link
Member

vito commented Jul 31, 2019

Can we just use https://github.com/concourse/retryhttp?

@xoebus
Copy link
Contributor Author

xoebus commented Jul 31, 2019

From README:

Retries on network errors, does not retry if request body was already read from (e.g. streaming request)

Would this cause it to not retry the above because it had already downloaded ~400MB?

@xoebus
Copy link
Contributor Author

xoebus commented Jul 31, 2019

Maybe this is a retry loop outside a single logical HTTP request?

@zachgersh
Copy link
Contributor

zachgersh commented Jul 31, 2019 via email

@xoebus
Copy link
Contributor Author

xoebus commented Jul 31, 2019

Yep

@xoebus
Copy link
Contributor Author

xoebus commented Jul 31, 2019

Not sure if this should be encapsulated inside the client or not but the lines below could be wrapped in a fixed-retry loop?

err = client.DownloadStemcell(stemcell, location, inRequest.Params.PreserveFilename)
if err != nil {
log.Fatalln(err)
}

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

3 participants