Repository navigation
fix(platform): stop large Worker uploads from timing out - #601
Merged
Merged
Conversation
The Worker upload body read each module from R2 one at a time, inside a fixed 120 s timer per attempt. An app with 744 modules could not fit, and every retry read all modules again, so the deploy failed after 8 minutes. - Open up to 4 later modules ahead (8 MiB at most) while the body streams. - Replace the fixed timer with a 60 s no-progress limit, a 120 s limit on Cloudflare's answer, and one 480 s budget for all attempts. - Log bytes sent, storage wait and response time for each attempt. - Use the same limits for the custom Durable Object host upload. - Add markdown-it to @void/md: markdown-it-attrs loads it at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A queued deployment runs in one invocation with a 15-minute limit. The app upload and each Durable Object host replay had their own 8-minute budget, so a slow but progressing deploy could be cut off in the middle of the cutover. - Queued runs set one upload deadline 10 minutes after they start, which leaves 5 minutes for compensation. - The app upload and every Durable Object replay end at that deadline. - Each replay leaves enough time before the deadline to undo the hosts already moved; otherwise it does not start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-worker-upload-read-ahead-void-cloud.voidzero-docs.workers.dev (commit a0a653c)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
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.
Problem
Large apps cannot deploy to Void Cloud. The
napi-imagedeploy (run) failed withThe Worker upload did not finish within 120 seconds. Deploy again.@void/mdhas a separate problem:markdown-it-attrs@5loadsmarkdown-itat runtime, but@void/mddoes not provide it. Apps fail withCannot find module 'markdown-it'unless they add it themselves.What this PR changes
attempt_failedand the newattempt_donelogs record bytes sent, time waiting on R2, and time waiting on Cloudflare. A later timeout shows which side was slow.@void/mdnow depends onmarkdown-it.Decisions
Rollout
No CLI change is needed. The fix is all on the platform side.
Known limits
settleExpiredDeployment) and HTTP rollback still have no run deadline. Each replay there keeps the 8-minute cap.settleExpiredDeployment) then restores the host, so mixed versions can last until the 18-minute lease expires. This design existed before this PR. A full fix needs a restore budget before any host changes, plus recovery that resumes across runs. It is left for a separate change.Testing
test/unit/worker-upload.test.ts(read-ahead order, byte bound, release, watchdog, run deadline)test/integration/api-deploy.test.ts(watchdog cuts stalled attempts, budget stops retries)test/integration/managed-durable-objects.test.ts(queued run ends DO replay at the deadline; undo time kept)test/integration/deployment-execution.test.ts(queued upload capped by the run deadline)@void/mdpacked into a fresh Yarn PnP projectmarkdown-it-attrsloads; it failed beforevp run checkvp run test --base origin/main🤖 Generated with Claude Code