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

ReadTimeout errors #1184

Closed
uatach opened this issue Nov 13, 2023 · 2 comments · Fixed by #1186 or #1182
Closed

ReadTimeout errors #1184

uatach opened this issue Nov 13, 2023 · 2 comments · Fixed by #1186 or #1182
Assignees
Labels
api: storage Issues related to the googleapis/python-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@uatach
Copy link

uatach commented Nov 13, 2023

I keep receiving requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Read timed out. (read timeout=60) when trying to write files to storage.

I've tried adding the timeout value when opening the file:
Client().bucket('my_bucket').blob('my_blob').open(mode='wb', timeout=3600)

Investigating the traceback:

 File "/usr/local/lib/python3.9/site-packages/google/cloud/storage/fileio.py", line 411, in _upload_chunks_from_buffer
    upload.transmit_next_chunk(transport)

I've found that the method transmit_next_chunk can receive a timeout param that is not being set.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Nov 13, 2023
@cojenco cojenco self-assigned this Nov 13, 2023
@cojenco cojenco added the status: investigating The issue is under investigation, which is determined to be non-trivial. label Nov 13, 2023
@cojenco cojenco added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed status: investigating The issue is under investigation, which is determined to be non-trivial. labels Nov 17, 2023
gcf-merge-on-green bot pushed a commit that referenced this issue Dec 4, 2023
@shamyjun22
Copy link

I keep receiving requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Read timed out. (read timeout=60) when trying to write files to storage.

I've tried adding the timeout value when opening the file: Client().bucket('my_bucket').blob('my_blob').open(mode='wb', timeout=3600)

Investigating the traceback:

 File "/usr/local/lib/python3.9/site-packages/google/cloud/storage/fileio.py", line 411, in _upload_chunks_from_buffer
    upload.transmit_next_chunk(transport)

I've found that the method transmit_next_chunk can receive a timeout param that is not being set.

@uatach, have you resolved this issue? I keep on receiving this exception.

@uatach
Copy link
Author

uatach commented Apr 29, 2024

@shamyjun22 I've added some retry logic and it was enough, I haven't tried the new package version yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
3 participants