Skip to content

helpers: raise default HTTP request timeout from 1s to 10s#1323

Open
mbouaziz wants to merge 1 commit into
mainfrom
fix-example-fetch-timeout-flake
Open

helpers: raise default HTTP request timeout from 1s to 10s#1323
mbouaziz wants to merge 1 commit into
mainfrom
fix-example-fetch-timeout-flake

Conversation

@mbouaziz

Copy link
Copy Markdown
Contributor

The skipruntime-bun job on #1321 failed in the database example: the client's PUT died with a TimeoutError and the run lost its remaining expected output. The failure is unrelated to that PR (the example is SQLite-based; the job's Postgres tests passed) — it's the example harness being flaky on a loaded executor.

fetchJSON and SkipServiceBroker abort requests after 1 second by default. The example client's PUT traverses express → SQLite → broker update against the Skip control service; under Bun running from source on a busy CI machine that round trip can exceed 1s, killing the client. The broker's own calls carry the same 1s bound, so the same slowness can surface as spurious 500s server-side.

This bumps both defaults to a shared 10s constant — generous enough not to give up on a slow service, while still bounding how long requests can hang. Callers can still pass an explicit timeout. Doc references to the default (including PolledHTTPResource.options, which forwards to fetchJSON) are updated to match.

🤖 Generated with Claude Code

fetchJSON and SkipServiceBroker aborted requests after 1 second by
default. On a loaded CI executor that window is too tight: in the
skipruntime-bun job, the database example's PUT (express -> SQLite ->
broker update against the Skip control service) exceeded it and the
client died with a TimeoutError, failing the job. The broker's own
calls carry the same 1s bound, so a slow service turns into spurious
500s server-side too.

Default both to a shared 10s constant: generous enough not to give up
on a slow service, while still bounding how long requests can hang.
Callers can still pass an explicit timeout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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