Skip to content

blob.upload_from_filename blocks for upwards of an hour. #3441

@tweeter0830

Description

@tweeter0830

I am using the following code to upload files to GCS.

blob = bucket.blob(gcs_filepath)
logging.info('Uploading file "%s" to "%s".', filepath, gcs_filepath)
blob.upload_from_filename(filepath)
logging.info('Uploaded file "%s" to "%s".', filepath, gcs_filepath)

This works most of the time. However, it has been stuck uploading for the last hour and has not raised an exception yet. It seems like this method should have a timeout or something for situations like this. It would also be helpful if it had the option to log the progress of the method for further diagnosis.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions