CHW-1305 ScanCapacityExhausted
scan capacity is saturated; retry after the interval in the Retry-After header
Default message: scan capacity is saturated; retry after the interval in the Retry-After header
HTTP status:429(client)
Reason:RATE_LIMITED
Problem. An on-demand package scan was refused because the scanner is
already at its concurrency ceiling. Cause. Scans are the most
expensive request the product serves and the caller chooses the package,
so the dependency tree comes with it. CHAINSAW_MAX_CONCURRENT_SCANS
(default 8) bounds how many run at once; foreground scans queue briefly
and then get this, while background follow-ups are dropped rather than
queued. Without that bound, scan load drew from the same database pool as
everything else and saturation surfaced as 503s for unrelated callers —
including the unauthenticated public read path, which performs no writes
at all. Fix. Honour the Retry-After header and retry; this is safe
to retry and is never returned for a read. If you see it steadily rather
than in bursts, raising CHAINSAW_MAX_CONCURRENT_SCANS is the lever — but
raise it deliberately: the default of 8 was chosen against sizing arithmetic
that has since been withdrawn, and real per-scan database-connection demand
has never been measured, so a higher ceiling trades scan throughput for pool
headroom the rest of the product shares. HTTP 429.