Commit

033c848

Our Caddy edge boxes were running out of memory. Caddy held 1.47 GB of 2 GB after 27 days up, yet open connections stayed flat for 28 days. A heap profile put 520 MB of 663 MB live heap in the reverse proxy's upstream connection pool. With proxy_protocol on, Caddy puts the client's address in the pool key. So every visitor gets a pool of their own, with Go's defaults: up to 32 idle connections, kept 2 minutes. Only that one client can ever reuse them. The fix is two lines: keepalive 30s and keepalive_idle_conns_per_host 2. Running proxy_protocol in front of anything? Go look at your heap.

commit 033c848