Skip to content

[base] Reduce likeliness of being throttled when uploading blobs#195

Open
ao-picterra wants to merge 1 commit into
masterfrom
avoid-upload-blob-throttle
Open

[base] Reduce likeliness of being throttled when uploading blobs#195
ao-picterra wants to merge 1 commit into
masterfrom
avoid-upload-blob-throttle

Conversation

@ao-picterra

Copy link
Copy Markdown
Collaborator

We don't retry on POST and PUTs, so uploading file to blobstore are subject to incur in "burst" throttling, this tries to reduce the likeliness.

if not resp.ok:
logger.error("Error when uploading to blobstore %s" % upload_url)
raise APIError(resp.text)
time.sleep(2)

@julienr julienr Jul 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something feels weird about this fix. This adds an unconditional sleep to the upload unless I'm missing something, which to me is a sign we should fix our throttling instead of the code here.

Like adding a sleep in a retry is fine, but we shouldn't need sleep in the happy path - this just means our throttling limit is too low.

(Maybe I'm misunderstanding the fix / this isn't ready yet)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry I didn't notice I assigned to you (I guess GH did it on his own), indeed the issue is on the server side and I'm fixing it there

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no all good, you didn't assign it but I still get notif (I'm repo owner or something I guess). So all good if its just wip/debug stuff :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants