From bd08f9a5fe7b71472e1707883d3c8bdb6529865c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Mon, 24 Aug 2026 21:22:52 +0000 Subject: [PATCH] no idle timeout on the sidecar's own server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this holds a connection open while whisper works, and nothing flows on it meanwhile — exactly what an idle timeout kills. unset, Bun drops the platform's connection at around 255s. it was the last of three hops still doing it. the proxy's outbound fetch and the platform's inbound timeout were both fixed earlier today and a 42-minute recording still died at 4m16s. whisperx went on and finished it; the result was discarded. with diarization on, align runs at roughly 1.5x the audio duration, so an hour-long episode needs ninety minutes. no ceiling is both safe and high enough, and 255 is Bun's maximum anyway — "raise it" was never available. 0 disables it. --- sidecar/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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);