Skip to content

FETCH_TIMEOUT_MS env var ignored in FunctionsHandlerMulti — hardcoded 2000ms fallback #1253

@redcat-berlynj

Description

@redcat-berlynj

Summary

Setting FETCH_TIMEOUT_MS (e.g. in Helm values) has no effect when events are processed through the FunctionsHandlerMulti HTTP handler. This handler falls back to a hardcoded 2000 ms instead of reading the env var, so users always see 2000ms timeouts regardless of their configuration.

All other timeout-sensitive paths in Rotor (rotor.ts, builder.ts, profiles-functions.ts, functions-server.ts) correctly use parseNumber(env.FETCH_TIMEOUT_MS, 2000). FunctionsHandlerMulti in services/rotor/src/http/functions.ts (line 40) was missed.

Steps to reproduce

  1. Set FETCH_TIMEOUT_MS=10000 in Rotor env (e.g. Helm values)
  2. Send events that trigger destination functions
  3. Observe 2000ms timeouts — the env var value is not respected

Fix

Import parseNumber + getServerEnv in functions.ts and replace the hardcoded 2000 with parseNumber(getServerEnv().FETCH_TIMEOUT_MS, 2000).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions