GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Upload of large files times out. · Issue #40 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Upload of large files times out. #40

Copy link
Copy link
Closed
Closed
Upload of large files times out.#40
Copy link
Assignees
tseaver
Labels
api: storageIssues related to the googleapis/python-storage API.type: questionRequest for information or clarification. Not an issue.

Description

@kylefoley76
kylefoley76
opened on Feb 3, 2020
Issue body actions

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:

  1. I can upload a 60 meg file to google drive with no problem. Basically takes about 6 minutes.
  2. When I try to upload a 20 meg file I get the aforementioned error.
  3. 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'))
Reacted by Caleb Hattingh, Bartek Pacia, Taylor Archibald, Maksim Kalmykov and Brandon Segal

Activity

  1. kylefoley76 commented on Feb 3, 2020

    @kylefoley76
    kylefoley76
    on Feb 3, 2020
    Author
    More actions

    I've got some more precise numbers. My connection speed is now about 2 mbps. I can upload a file of 10 mb but nothing larger, otherwise I get the connectionerror. Also, I can upload files of at least 60 mb with Google Drive, so it's not like you need a high upload speed to upload a large file.

  2. busunkim96
    transferred this issue fromgoogleapis/google-cloud-pythonon Feb 3, 2020
  3. product-auto-label
    added
    api: storageIssues related to the googleapis/python-storage API.
    on Feb 3, 2020
  4. busunkim96
    added
    type: questionRequest for information or clarification. Not an issue.
    on Feb 3, 2020
  5. frankyn
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Feb 4, 2020
  6. yoshi-automation
    added
    🚨This issue needs some love.
    and removed
    🚨This issue needs some love.
    on May 4, 2020
  7. IlyaFaer commented on Jun 15, 2020

    @IlyaFaer
    IlyaFaer
    on Jun 15, 2020
    More actions

    @kylefoley76, please, take a look at this comment, it seems to be the info that can help in your case

  8. yoshi-automation
    added
    🚨This issue needs some love.
    on Aug 1, 2020
  9. tseaver
    removed
    🚨This issue needs some love.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Aug 17, 2020
  10. tseaver
    changed the title [-]storage: connectionerror[/-] [+]Upload of large files times out.[/+] on Aug 17, 2020
  11. tseaver commented on Aug 17, 2020

    @tseaver
    tseaver
    on Aug 17, 2020
    Contributor
    More actions

    PR #185 added explicit timeout arguments to the Blob methods making API calls. You should be able to pass a longer timeout to resolve this issue.

    Reacted by Maksim Kalmykov
  12. tseaver
    closed this as completedon Aug 17, 2020
  13. JustinBeckwith
    assigned
    tseaver
    on Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: storageIssues related to the googleapis/python-storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.