From 2c3db10bf05322e852effca2c039d02ad46b6308 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Tue, 17 Nov 2026 23:57:25 +0800 Subject: [PATCH] fix(youko): enlarge the nix cache proxy upstream keepalive pool Assisted-by: DeepSeek Harness (claude-opus-5-5) --- .../12kingdoms-youko/homelab-services/nix-cache-proxy.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/12kingdoms-youko/homelab-services/nix-cache-proxy.nix b/hosts/12kingdoms-youko/homelab-services/nix-cache-proxy.nix index 8a411d41..138fd9ff 100644 --- a/hosts/12kingdoms-youko/homelab-services/nix-cache-proxy.nix +++ b/hosts/12kingdoms-youko/homelab-services/nix-cache-proxy.nix @@ -63,7 +63,13 @@ in host: lib.nameValuePair (upstreamName host) { servers."${host}:443" = { }; - extraConfig = "keepalive 16;"; + # Several Nix clients open up to 25 connections each; keep them idle + # between bursts instead of handshaking again. + extraConfig = '' + keepalive 128; + keepalive_requests 2000; + keepalive_timeout 120s; + ''; } );