Skip to content

test(workerd): back off on Cloudflare error pages, honour Retry-After - #157

Closed
okomarov wants to merge 2 commits into
mainfrom
edge-backoff
Closed

okomarov wants to merge 2 commits into
mainfrom
edge-backoff

Conversation

@okomarov

Copy link
Copy Markdown

The edge runner retried a Cloudflare error page once. In run 39229088257, Cloudflare answered every request with its own HTTP 500 for about 95 seconds after repeated exceededCpu outcomes on the Workers Free plan, so the long Hyperdrive run failed on the platform, not the driver.

The runner now waits Retry-After when the response carries one (seconds or an HTTP date); otherwise it waits 2 s, doubling up to 30 s. It gives up after 180 s per scenario. Each result line reports platformErrors and waitedMs.

…ter in the edge runner

On the Workers Free plan Cloudflare throttled every request to the edge
Preview for about 95 seconds after repeated exceededCpu outcomes (run
39229088257), serving its own HTTP 500 page. A single retry could not
ride that out. The runner now waits Retry-After when Cloudflare sends one,
otherwise 2 s doubling to 30 s, for up to 180 s per scenario, and reports
platformErrors and waitedMs.
The two edge jobs share one Neon database and run at the same time. One
job dropped and recreated workerd_subscribe between the other's drop and
create, which failed with 42710 publication already exists (run
39232289023). The scenario now creates the publication once and reuses it.
@okomarov

Copy link
Copy Markdown
Author

Folded into #158 as one commit.

@okomarov okomarov closed this Oct 19, 2026
@okomarov
okomarov deleted the edge-backoff branch October 19, 2026 13:18
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.

1 participant