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

Increase Azure Blobstore connection_timeout. #1827

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions metaflow/plugins/datastores/azure_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,19 @@ def save_bytes_single(
# It is good enough 99.9% of the time.
# Depending on ResourceExistsError is more costly, though
# we are still going to handle it right.

# The default timeout in the Azure blobstore python SDK
# doesn't work well on slower network connections and largish
# files. Hence increasing the connection_timeout below.
# For more details, see this:
# https://github.com/Azure/azure-sdk-for-python/issues/23232
if overwrite or not blob.exists():
blob.upload_blob(
byte_stream,
overwrite=overwrite,
metadata=metadata_to_upload,
max_concurrency=AZURE_STORAGE_UPLOAD_MAX_CONCURRENCY,
connection_timeout=14400,
)
except ResourceExistsError:
if overwrite:
Expand Down
Loading