You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Http REFUSED_STREAM when uploading bundle files/artifacts leaves bundle in a broken state #6472
When uploading large amounts of wheels, the cli errors sporadically with http2 REFUSED_STREAM errors. When this happens the artifacts have been uploaded but the bundle files have not been updated to reference them. The old artifacts are deleted, so the bundle is left in a broken state.
It's difficult to reproduce since it's a transient http2 error. About one in 200-500 deploys hits this issue. It always appears on a GET request to /api/2.0/workspace/get-status. It may be an sdk issue with the retries on databricks.WorkspaceClient.
It seems like the deployment should be rolled back if it fails mid-deploy. Or the requests retried more gracefully. Maybe a configuration option for number of retries could be implemented?
Here's the edited output from a failed deployment.
Building project...Building python_deps......Lots of artifact uploadsUploading ...-py3-none-any.whl...Uploading ...-py3-none-any.whl...Uploading ...-py3-none-any.whl...Uploading ...-py3-none-any.whl...Uploading ...-py3-none-any.whl...Uploading ...-py3-none-any.whl......Uploading bundle files to /Workspace/<CENSORED>.bundle/files...Error: Get "https://<CENSORED>.cloud.databricks.com/api/2.0/workspace/get-status?path=<CENSORED>.bundle%2Ffiles": stream error: stream ID 287; REFUSED_STREAM; received from peer
Configuration
Put a lot of wheels in the directory. An example is a requirements file with 100+ dependencies. With the build looking something like this.
We have a new feature called immutable folder which allows bundle to deploy to unique location and change the resources referencing the artifacts atomically, this would prevent this issue. Please give it a try.
We have a new feature called immutable folder which allows bundle to deploy to unique location and change the resources referencing the artifacts atomically, this would prevent this issue. Please give it a try.
It does sound like that would solve the problem. I just gave it a shot. Unfortunately, the bundle is too large in this case. Looks like the size limit is 100MB but the bundle is about 250MB.
databricks bundle deploy -t userBuilding project...Building python_deps...Uploading immutable bundle snapshot...Error: snapshot upload: Server received a request which exceeds maximum allowed content length. RequestSize(bytes): 264767245, Limit(bytes): 104857600 (400 BAD_REQUEST)Endpoint: POST https://CENSORED/api/2.0/repos/snapshotsHTTP Status: 400 Bad RequestAPI error_code: BAD_REQUESTAPI message: Server received a request which exceeds maximum allowed content length. RequestSize(bytes): 264767245, Limit(bytes): 104857600
Roughly how much time does it take to complete all the artifact uploads?
Do you have a HTTP/2 proxy sitting between this runtime environment and Databricks?
Our SDK (via Go's stdlib) already retries on REFUSED_STREAM but in this case it seems like the server continues to return the same error, exhausting Go's own retries, and then failing. We're looking into adding another retry one level up where we can force the underlying connection to be recreated. Answers to the above questions would be helpful in dialing in on the root cause. Thanks!
Activity
andrewnester commentedon Sep 2, 2026
We have a new feature called immutable folder which allows bundle to deploy to unique location and change the resources referencing the artifacts atomically, this would prevent this issue. Please give it a try.
#5254
jmahlik commentedon Sep 2, 2026
It does sound like that would solve the problem. I just gave it a shot. Unfortunately, the bundle is too large in this case. Looks like the size limit is 100MB but the bundle is about 250MB.
pietern commentedon Oct 9, 2026
@jmahlik A couple of questions:
Our SDK (via Go's stdlib) already retries on
REFUSED_STREAMbut in this case it seems like the server continues to return the same error, exhausting Go's own retries, and then failing. We're looking into adding another retry one level up where we can force the underlying connection to be recreated. Answers to the above questions would be helpful in dialing in on the root cause. Thanks!jmahlik commentedon Oct 12, 2026
About 30 seconds from artifact upload until uploads complete.
No for the cases where we see this failing. I've tested behind a proxy and works the same. Hard to reproduce the issue because it's sprious.
janniklasrose commentedon Oct 14, 2026
Hi @jmahlik, an update on our side:
This week's release will include #6149 which changes the underlying file import API and hopefully makes file uploads more stable.
#7014 is also in flight and adds retries on
bundle deploy.#7044 should fix the /get-status errors
Retry workspace get-status on transient failures during sync
Retry workspace get-status on transient failures during sync
retry: scope get-status transport retry to REFUSED_STREAM
Retry workspace get-status on transient failures during sync (databri…
andrewnester commentedon Oct 19, 2026
The fix was released in the latest CLI version, please give it a try and if the issue persists feel free to reopen the issue