Archives
Every essay, tool teardown, and build note, newest first.
-

Too Many Open Files: the accept() Spin, the TIME_WAIT Pile, and the Descriptor Budget That Fixes Only the Spin
At a 64-descriptor limit one accept loop made 238,509 refused calls in half a second while its 64 clients waited, and served none of them.
Read the article → -

SQLite in Production: database is locked, 37 ms Commits and a WAL That Never Checkpoints – a Measured Runbook
Four processes lost 180 of 240 units to SQLITE_BUSY, and on this network mount a rollback-journal commit costs 37.2 ms against 8.8 ms in WAL.
Read the article → -

Python Logging in Production: the Rotation Race, 5 ms fsyncs, Dropped Records and the Event Loop – a Measured Runbook
Four processes on one rotating log left 526 of 800 records on disk and dropped 7 while rolling; a lock around the rollover kept all 800.
Read the article → -

Python subprocess Deadlocks: the 64 KiB Pipe, Zombies, Orphan Process Groups and asyncio Descriptor Leaks – a Measured Runbook
A pipe holds 65,536 bytes, so a child that writes more stops dead: reading it in the wrong order delivered 131,072 bytes, then waited forever.
Read the article → -

Streaming in FastAPI and Starlette: Chunk Size, Backpressure and the Abandoned Client – a Measured Runbook
One chunk per event cost 9.811 us against 2.901 in batches of a hundred, and an abandoned client took 1.0 MiB of a 256.0 MiB body.
Read the article → -

Pydantic v2 in Production: Schema Compilation Cost, ValidationError Floods and Serialization Bottlenecks – a Measured Runbook
One dynamic model per request cost 358.046 us, 1,000 errors became 218.7 KiB of log text, and a tagged union was 2.94x faster.
Read the article → -

ProcessPoolExecutor in Production: BrokenProcessPool, Hung Workers and Fork Deadlocks – a Measured Runbook for Python 3.12
Measured: one dead ProcessPoolExecutor worker broke 8 of 8 queued futures, a hung worker blocked shutdown forever, and a fork child hung on a lock.
Read the article → -

pytest-asyncio in Production CI: Cross-Loop Futures, Leaked Tasks and Flaky Async Tests – a Measured Isolation Runbook
Measured pytest-asyncio isolation: cross-loop futures fail 20/20 runs, leaked tasks stay invisible, and a small guard names the culprit.
Read the article → -

httpx AsyncClient in Production: PoolTimeout, RemoteProtocolError, Keep-Alive Exhaustion & Retry Storm Defense with tenacity
Measured httpx failure modes: PoolTimeout is queue arithmetic, keep-alive races raise RemoteProtocolError, and jitter plus a breaker stop retry storms.
Read the article → -

SQLAlchemy 2.0 Async in Production: Resolving MissingGreenlet, Connection Pool Leaks, N+1 Queries & Transaction Deadlocks
A measured runbook for SQLAlchemy 2.0 async: MissingGreenlet on expired attributes, N+1 behind run_sync, leaked pool slots, and which SQLSTATEs to retry.
Read the article →