-
Notifications
You must be signed in to change notification settings - Fork 1.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
gensupport: resumable uploads shouldn't use a hardcoded retryDeadline #685
Comments
cc @tritone |
I keep running into HTTP 502 errors on GCS writes, and it took an embarrasingly long time to figure out this was the root cause. The hardcoded 32 second timeout means that @tritone's recent work on improving GCS retries in googleapis/google-cloud-go#5210 is basically useless for me. On my peasant residential internet connection, the default chunk size (16MiB) takes longer than 32 seconds to upload (especially considering concurrent writes, intentional network throttling, and the unfortunate realities of cable internet), so there's no time left for retries if the first attempt fails. What's worse is that since this value is hardcoded, I had to patch google-api-go-client in order to extend the timeout.
Please consider increasing the default or making this configurable (or both). Thanks! :) |
Allow users to configure the per-chunk deadline for retries that's used during resumable uploads. Needs to be exposed via the manual layer for storage. Fixes googleapis#685
Allow users to configure the per-chunk deadline for retries that's used during resumable uploads. Needs to be exposed via the manual layer for storage. Fixes #685
Thanks for the quick action on this @tritone! |
Expose the ChunkRetryDeadline MediaOption through the manual client layer. This allows users to set a longer deadline for chunk retries in resumable uploads if desired. I also considered this as a RetryOption, but 1. it's only relevant for uploads and 2. it should be configured in conjunction with ChunkSize which is a field on Writer. Updates googleapis/google-api-go-client#685
Expose the ChunkRetryDeadline MediaOption through the manual client layer. This allows users to set a longer deadline for chunk retries in resumable uploads if desired. I also considered this as a RetryOption, but 1. it's only relevant for uploads and 2. it should be configured in conjunction with ChunkSize which is a field on Writer. Updates googleapis/google-api-go-client#685
There is a hardcoded
retryDeadline
of 32s for each chunk of a resumable upload which seems rather short for reliable uploads: https://github.com/googleapis/google-api-go-client/blob/master/internal/gensupport/resumable.go#L27When doing many resumable uploads to GCS we often encounter 503 responses for some objects lasting for longer than 32s, which makes the whole upload for that object fail.
It would be great if we could just use the deadline of the context for timing out retries or make the
retryDeadline
an option.The text was updated successfully, but these errors were encountered: