diff --git a/sidecar/index.ts b/sidecar/index.ts index 159e8a4..9456794 100644 --- a/sidecar/index.ts +++ b/sidecar/index.ts @@ -87,6 +87,20 @@ const server = Bun.serve({ hostname: '127.0.0.1', // A phone's voice memo is small; this just needs to be well above any single recording. maxRequestBodySize: 1024 * 1024 * 1024, + /* + No idle timeout. This server holds a connection open while whisper works, and nothing flows on it in + the meantime — which is exactly what an idle timeout kills. + + Unset, Bun applies its own ceiling and drops the platform's connection at around 255s. That was the + last of three hops still doing it: the proxy's outbound fetch and the platform's inbound timeout were + both fixed on 2026-08-24 and a 42-minute recording STILL died at 4m16s, because this one had not been. + whisperx went on and finished it, and the result was thrown away. + + With diarization on, align runs at roughly 1.5x the audio duration, so an hour-long episode needs + ninety minutes of processing. There is no ceiling that is both safe and high enough — 255s is Bun's + maximum anyway, so "raise it" was never available. 0 disables it. + */ + idleTimeout: 0, async fetch(req) { const url = new URL(req.url);