From b4740f3b7860fb2056a4d0cac28f8d3d209485b3 Mon Sep 17 00:00:00 2001 From: Arne Luenser Date: Wed, 29 Jul 2026 15:34:48 +0200 Subject: [PATCH] fix: raise the proxy and tunnel read and write timeouts to 120s graceful.WithDefaults applies a 5s read and 10s write timeout, which cut slower exchanges off mid-flight and left the client with an empty reply rather than an error. The upstream is the developer's own application and may legitimately take longer. Closes #302 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01JYzGVwAKQ4ormxRHZg1eDu --- cmd/cloudx/proxy/helpers.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/cloudx/proxy/helpers.go b/cmd/cloudx/proxy/helpers.go index 79e4824f..f604be6b 100644 --- a/cmd/cloudx/proxy/helpers.go +++ b/cmd/cloudx/proxy/helpers.go @@ -239,6 +239,12 @@ func runReverseProxy(ctx context.Context, h *client.CommandHelper, stdErr io.Wri server := graceful.WithDefaults(&http.Server{ Addr: addr, Handler: ch.Handler(mw), + // graceful.WithDefaults would otherwise apply a 5s read and 10s write + // timeout, which cut slower exchanges off mid-flight and leave the client + // with an empty reply. The upstream here is the developer's own + // application and may legitimately take longer than that. + ReadTimeout: 120 * time.Second, + WriteTimeout: 120 * time.Second, }) if conf.isTunnel {