Skip to content

Fixed Workers duration limits in 6 files.#30871

Open
ask-bonk[bot] wants to merge 6 commits into
productionfrom
opencode/issue30529-20260517232436
Open

Fixed Workers duration limits in 6 files.#30871
ask-bonk[bot] wants to merge 6 commits into
productionfrom
opencode/issue30529-20260517232436

Conversation

@ask-bonk
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot commented May 17, 2026

Done! I've addressed the issue across six files. Here's what changed:

1. HTTP request duration limits (the core issue)

Files: src/content/docs/workers/platform/limits.mdx, src/content/partials/workers/wall-time-limits.mdx

  • Changed the HTTP request duration limit from "No limit / Unlimited" to 30 seconds.
  • Clarified that the response must be returned within this 30-second window.
  • Corrected the waitUntil() description: it no longer says it "delays cancellation for another 30 seconds after the response is sent." Instead, it states that waitUntil() tasks must complete within the same 30-second total wall time.
  • Updated the Subrequests section to note that subrequests must complete within the 30-second total wall time.

2. ctx.waitUntil() duration wording

File: src/content/docs/workers/runtime-apis/context.mdx

  • Updated the caution block to explain that the total invocation wall time is 30 seconds for HTTP-triggered Workers, and waitUntil() tasks must finish within that total limit (not 30 seconds after the response).

3. Best practices guidance

File: src/content/docs/workers/best-practices/workers-best-practices.mdx

  • Changed the pitfall description from "exceeding the 30-second waitUntil time limit after the response is sent" to "exceeding the 30-second total invocation wall time limit."

4. Scheduled handlers and waitUntil necessity

File: src/content/docs/workers/runtime-apis/handlers/scheduled.mdx

  • Updated the basic syntax examples to use await doSomeTaskOnASchedule() instead of ctx.waitUntil(doSomeTaskOnASchedule()), reflecting that the runtime waits for the returned promise.
  • Updated the multiple-cron-trigger examples similarly.
  • Rewrote the ctx.waitUntil() method description to say it registers tasks rather than "notifies the runtime to wait."
  • Added a :::note explaining that the runtime waits for the handler's returned promise (up to 15 minutes), so waitUntil() is not required for single async tasks, but remains useful for concurrent tasks and Cron Trigger status reporting.

5. Errors/logging page wording

File: src/content/docs/workers/observability/errors.mdx

  • Replaced the misleading "outstanding asynchronous tasks are canceled as soon as a Worker finishes sending its main response body" with a precise definition of floating promises and how ctx.waitUntil() ensures completion.
  • Updated the link to point to the Cloudflare ctx.waitUntil() docs instead of the generic MDN event.waitUntil() page.

Validation

  • pnpm run check passed with 0 errors.
  • Formatted all edited files with Prettier.

Closes #30529

github run

Co-authored-by: irvinebroque <irvinebroque@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

This PR requires additional review attention because it affects the following areas:

Partials

This PR updates partial files, which are pieces of content used across multiple files in our Render component.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 17, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/durable-objects/ @elithrar, @vy-ton, @joshthoward, @oxyjun, @lambrospetrou, @mikenomitch, @cloudflare/product-owners
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/product-owners, @cloudflare/wrangler, @MattieTK, @cloudflare/dev-plat-leads
/src/content/docs/workers/observability/ @irvinebroque, @mikenomitch, @nevikashah, @cloudflare/product-owners
/src/content/partials/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @WalshyDev, @cloudflare/deploy-config, @cloudflare/product-owners, @cloudflare/wrangler, @MattieTK

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 17, 2026

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

Labels

product:workers Related to Workers product size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workers Duration (wall time/clock) limits incorrectly/misleadingly described

7 participants