Repository navigation
fix(cli): Wait up to 120s for chunk-upload POSTs - #2152
Merged
Merged
Conversation
Chunk uploads used the 30s default request timeout. The server sometimes takes longer than that to store chunks, so the CLI aborted requests the server went on to finish, then uploaded them again, and failed after three attempts. Give the chunk-upload fetch a 120s per-attempt timeout, which covers the 90s the proxy in front of Sentry waits for this endpoint plus time to send the body. The timeout is set on the fetch the chunk uploads use, not by URL, because the upload URL comes from the server. Co-Authored-By: bete <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
betegon
approved these changes
Nov 10, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Chunk-upload POSTs (source maps, debug files, ProGuard, builds) used the 30s default request timeout. Sometimes the server takes longer than that to store chunks. When it does, the CLI aborts a request that the server goes on to finish, sends it again, and fails with a timeout after three attempts (CLI-R9). This PR gives chunk-upload POSTs a 120s timeout per attempt. Nothing else changes.
The timeout is an option on the fetch that the chunk uploads use (
getSdkConfig(..., { idempotent: true, timeoutMs })). It is not a URL pattern inENDPOINT_TIMEOUT_OVERRIDESlike autofix's, for two reasons. The upload URL comes from the server, so a path pattern might not match it. And a path pattern would also cover the GET for the chunk-upload options.Data
Spans from the CLI's own telemetry:
http.clientPOSTs tochunk-upload, aggregates only. On 0.45.x, one span covers every attempt of a request.Server side: the transactions Sentry records for the same POSTs, filtered to this CLI by user agent, over 7d. These show how long the server took even when the client had already given up.
Requests that took 30s or longer: 3,192. Of those, 800 took 60s or longer, 360 took 90s or longer, 176 took 120s or longer, and 16 took 180s or longer. Most of the time goes to storing the blobs (
FileBlob.from_files), not to receiving the body. In one sampled 0.45.0 upload with a 1.3 MB body, the server returned 200 after 30.6s. The client had already aborted at 30s, and the retry finished in 84 ms.Why 120s
nginx.conf(proxy_read_timeout 90s). Sentry's app server sets no request timeout. A client timeout much above 90s plus upload time buys nothing, because the proxy returns a 504 first.The CLI changelog comes from release notes, so this PR has no changelog entry.
via @betegon.
--
View Session in Sentry