From fa729a62106672da5763e5a39e69b56b5e9abb92 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 15 Mar 2024 11:57:46 -0700 Subject: [PATCH] haproxy: set keepalive mode for kojipkgs We are hitting a sporadic and anoying 502 error with ostree pulls. see https://pagure.io/releng/issue/11439 The problem seems to be between haproxy and varnish on kojipkgs01. We set the httpclose option in haproxy globally, which closes connections as soon as it thinks they are done. Setting this option 'httpkeepalive' will keep connections alive and handle the case of lots of fast connections downloading small objects much better. Sadly, we don't have a way to test this in staging, so we would need to test in prod and roll back if there's problems. Signed-off-by: Kevin Fenzi --- roles/haproxy/templates/haproxy.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index 2598322022..853382aa8d 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -351,8 +351,10 @@ backend ipa01-backend frontend kojipkgs-frontend bind 0.0.0.0:10062 default_backend kojipkgs-backend + option http-keep-alive backend kojipkgs-backend + option http-keep-alive balance uri server kojipkgs01.{{ datacenter }}.fedoraproject.org kojipkgs01.{{ datacenter }}.fedoraproject.org:80 check inter 10s rise 1 fall 2 server kojipkgs02.{{ datacenter }}.fedoraproject.org kojipkgs02.{{ datacenter }}.fedoraproject.org:80 check inter 10s rise 1 fall 2