-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Storage: ConnectionError when uploading #4420
Comments
Hello, I am not sure it's a bug or not. Could you please share your code with us? By the way, I see your google-cloud version is old. Could you try to upgrade it? |
The following is a simplified code which has failed: client = storage.Client(project_name, scoped_credentials)
bucket = client.bucket(bucket_name)
blob = bucket.blob(path, 1048576)
blob.upload_from_string(content, content_type=content_type) This issue is not easy to reproduce because it happens less than 1:1000 cases (rough estimate). |
@Indy2222 It's not unexpected that the low-level (i.e. socket-level) connection would fail very infrequently, and that's what this error indicates. That doesn't mean we can't catch this exception and retry, so thanks for reporting! @jonparrott Do you know the retry policy that |
It should retry connection errors a few times, but will give up pretty quickly. I'm not sure the exact semantics. |
@jonparrott Do you think we should try to catch |
No. IMO, those are akin to socket-level errors. |
I am going to close this issue based on my last comment, but feel free to comment if this is still an issue. |
Traceback:
Setup:
The text was updated successfully, but these errors were encountered: