-
Stefy Lanza (nextime / spora ) authored
`_pool_size()` is a PER-POD figure -- what `requests` means by `pool_maxsize`, which keeps one pool per host. The async client that forwards every page to every pod is ONE httpx.AsyncClient for the whole fleet, and httpx's `max_connections` is a TOTAL across hosts. Passing the per-pod 256 to it capped every page forward in the install at 256. Measured 2026-10-19 on a 31-pod fleet: 1,583 pages holding a pod lease, 284 TCP connections to pods in total -- six pods with 25-49 connections, most with exactly one. Renting more pods added cards and no throughput. Pages that waited too long for a connection failed with an empty-message timeout, reported as the pod being unreachable, and healthy pods were quarantined for it. The async client is now sized from the page ceiling the install is configured for (ocr.max_concurrency + headroom, capped at 16384): 5120 at the current 4096. The sync per-host pool is unchanged; per host is the right meaning there. An existing test asserted the shared client's limit equalled the per-pod figure -- it pinned the bug, and now asserts the fleet total. Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KnfkxBpcZ1v6ypRFFyhrVM
9e1f16a7