Skip to content

Use FETCH_TIMEOUT_MS instead of a hardcoded 2000ms#1254

Open
jberlyn wants to merge 1 commit intojitsucom:newjitsufrom
jberlyn:fetch-timeout-hardcoded-1253
Open

Use FETCH_TIMEOUT_MS instead of a hardcoded 2000ms#1254
jberlyn wants to merge 1 commit intojitsucom:newjitsufrom
jberlyn:fetch-timeout-hardcoded-1253

Conversation

@jberlyn
Copy link
Copy Markdown

@jberlyn jberlyn commented Apr 9, 2026

  • Replaces the hardcoded 2000ms fallback timeout in the functions HTTP handler with a configurable value read from the FETCH_TIMEOUT_MS environment variable.
  • The default remains 2000ms if the env var is not set, preserving existing behavior.

In FunctionsHandlerMulti, when the x-request-timeout-ms header is not present on a request, the fetch timeout fell back to a hardcoded 2000. This value is now read from getServerEnv().FETCH_TIMEOUT_MS at startup (using parseNumber with a default of 2000), making it configurable without a code change.

Fixes #1253

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.

FETCH_TIMEOUT_MS env var ignored in FunctionsHandlerMulti — hardcoded 2000ms fallback

1 participant