fix(infra): 9router Caddy timeouts — false 504 on slow LLM TTFT

9router combo models (deepseek-v4-flash-free fallback) have TTFT up to
30-40s. Default (proxy) response_header_timeout 30s / read 60s caused
false-positive 504 'timeout awaiting response headers' even while 9router
was processing. Give the 9router route dedicated long timeouts
(response_header 120s, read/write 300s). Syncs /etc/caddy/Caddyfile.
This commit is contained in:
asepharyana
2026-08-04 22:02:09 +07:00
parent d02989f1a7
commit a6148753ca
+17 -1
View File
@@ -53,7 +53,23 @@ tools.asepharyana.my.id, tools.asepharyana.web.id {
9router.asepharyana.my.id {
# LLM streaming: 9router combo models punya TTFT sampe 30-40s (deepseek,
}
# fallback chain). Default (proxy) response_header_timeout 30s / read 60s
# bikin false-positive 504 walau 9router masih ngolah. Longgarkan khusus
# biar health-check & request PR-Agent real gak kena timeout transient.
encode zstd gzip
header {
-Server
X-Content-Type-Options "nosniff"
}
reverse_proxy 127.0.0.1:4014 {
transport http {
dial_timeout 3s
response_header_timeout 120s
read_timeout 300s
write_timeout 300s
}
}
}
pr-agent.asepharyana.my.id {
import proxy 4002