fix(caddy): raise the memory cap and challenge cookieless crawlers #870
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra!870
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/caddy-memory-and-crawler-edge"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Problem
On 2026-11-08 every vhost (www, git, id) hung at the TLS handshake. A crawler hit
git.bitborg.sefrom more than 500 IPs with no cookies, mostly label-filtered issue and PR lists, blame and commit
diffs. No per-IP rate limit tripped.
Caddy grew to about 940 MiB. At
MemoryHigh=192Mthe kernel throttled it 42 011 times and swapped753 MiB to
/swapfile. Caddy fronts every vhost, so all of them stalled. Forgejo, Keycloak andPostgres stayed healthy.
Change
MemoryHigh=1G,MemoryMax=1536MandMemorySwapMax=0. An overrun nowrestarts Caddy instead of thrashing it.
git.bitborg.se: a cookielessGET/HEADto an expensive HTMLpage gets
Set-Cookie: bitborg_human=1and a 302 back to the same URL. Browsers pass unnoticed.src/commit/,commit/,commits/,blame/,compare/,pulls/<n>/files,pulls/<n>/commits, andissues/pullslists withlabels=..diff/.patch, branch and tag views, the API, git, LFS,the registry, any
POST.caddy_crawler_challenge_enabled: false.test_crawler_challenge.shruns the real Caddyfile block in the pinned Caddy image.Trade-offs
Apply
Expect
302withset-cookie: bitborg_human=1. The live runtime override on prod becomes redundant.