-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
OS 10.14.4
Python 3.8.0
Google_cloud_storage: 1.20.0
I am getting a connection error due to the following code:
blob = bucket.blob(file)
blob.upload_from_filename(file)
This is certainly a fault of google.client.storage for the following reasons:
- I can upload a 60 meg file to google drive with no problem. Basically takes about 6 minutes.
- When I try to upload a 20 meg file I get the aforementioned error.
- I've uploaded about 70,000 files so far with this code, most between 10 and 60 megs with no problem.
I think I've had this problem before and it happened when my upload speed was between 1 and 2 mbps which is what my upload speed is now. When my upload speed is above 10 mbps I do not have this problem.
Still, I should be able to upload an 18 meg file in less than 18 seconds, so I don't see why I'm getting a connection error.
Here is the full traceback:
blob.upload_from_filename(file)
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1246, in upload_from_filename
self.upload_from_file(
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1195, in upload_from_file
created_json = self._do_upload(
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1105, in _do_upload
response = self._do_resumable_upload(
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/cloud/storage/blob.py", line 1053, in _do_resumable_upload
response = upload.transmit_next_chunk(transport)
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py", line 419, in transmit_next_chunk
response = _helpers.http_request(
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/resumable_media/requests/_helpers.py", line 116, in http_request
return _helpers.wait_and_retry(func, RequestsMixin._get_status_code, retry_strategy)
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/resumable_media/_helpers.py", line 150, in wait_and_retry
response = func()
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/google/auth/transport/requests.py", line 207, in request
response = super(AuthorizedSession, self).request(
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/Users/kylefoley/codes/venv/lib/python3.8/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', timeout('The write operation timed out'))
cjrh, bartekpacia, Tahlor, mkalmykov and brandon-segal
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.