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
- Set
FETCH_TIMEOUT_MS=10000 in Rotor env (e.g. Helm values)
- Send events that trigger destination functions
- 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).
Summary
Setting
FETCH_TIMEOUT_MS(e.g. in Helm values) has no effect when events are processed through theFunctionsHandlerMultiHTTP handler. This handler falls back to a hardcoded2000ms 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 useparseNumber(env.FETCH_TIMEOUT_MS, 2000).FunctionsHandlerMultiinservices/rotor/src/http/functions.ts(line 40) was missed.Steps to reproduce
FETCH_TIMEOUT_MS=10000in Rotor env (e.g. Helm values)Fix
Import
parseNumber+getServerEnvinfunctions.tsand replace the hardcoded2000withparseNumber(getServerEnv().FETCH_TIMEOUT_MS, 2000).