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

Add timeout for @google-cloud/storage #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

henrik242
Copy link
Contributor

Copy link
Member

@stigkj stigkj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@trygve-lie
Copy link
Contributor

trygve-lie commented Jun 18, 2021

I do not think this is the right approach to be honest. ECONNRESET can be any error happening on the server forcing it to terminate the connection. An inactive / slow server might be one reason for a ECONNRESET so a bump in the socket time out will help in that case but it won't help if ex the server is rate limiting (it there is a lot of files being uploaded at once) or certain intermittent server errors.

I think the more correct approach [1] here is to enable autoRetry [2]. That should handle both timouts, rate limiting and other server errors the cloud throws at us. Not just timeouts.

Might wanna set a higher maxRetries also.

1 - https://cloud.google.com/storage/docs/retry-strategy
2 - https://googleapis.dev/nodejs/storage/latest/global.html#StorageOptions

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.

3 participants