From 6c237e8d403b8f491bf87ebb90ac104ed36fd9e7 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Thu, 4 Jul 2024 14:42:49 +0200 Subject: [PATCH] gerrit01: make it go brrr on https clone proxy_buffering was the root cause. Signed-off-by: Raito Bezarius --- services/gerrit/default.nix | 9 +++++---- services/gerrit/www.nix | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/gerrit/default.nix b/services/gerrit/default.nix index 7ba4fcd..44ca7ae 100644 --- a/services/gerrit/default.nix +++ b/services/gerrit/default.nix @@ -76,11 +76,12 @@ in database.poolLimit = "250"; database.poolMaxIdle = 16; http.maxThreads = 100; - # core.packedGitLimit = "4g"; - # core.packedGitWindowSize = "16k"; - # core.packedGitOpenFiles = "4096"; + core.packedGitLimit = "4g"; + core.packedGitWindowSize = "16k"; + core.packedGitOpenFiles = "4096"; receive.timeout = "4min"; - # pack.threads = "8"; + transfer.timeout = "4min"; + pack.threads = "8"; log.jsonLogging = true; log.textLogging = false; sshd.advertisedAddress = "cl.forkos.org:29418"; diff --git a/services/gerrit/www.nix b/services/gerrit/www.nix index 9976774..8ad815c 100644 --- a/services/gerrit/www.nix +++ b/services/gerrit/www.nix @@ -11,6 +11,7 @@ in appendHttpConfig = '' add_header Permissions-Policy "interest-cohort=()"; ''; + recommendedProxySettings = false; }; services.nginx.virtualHosts.gerrit = { serverName = builtins.head cfg.domains; @@ -24,6 +25,8 @@ in proxy_set_header X-Forwarded-For $remote_addr; # The :443 suffix is a workaround for https://b.tvl.fyi/issues/88. proxy_set_header Host $host:443; + # Gerrit can throw a lot of data. + proxy_buffering off; } location = /robots.txt {