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

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 → -

Fixing Memory Leaks in Production Python: How to Profile, Detect, and Resolve OOM Errors in Celery & Asyncio Workers
Measured on Python 3.12.16: what a leak costs in Celery and asyncio workers, the five patterns that cause it, and the guard module that keeps it fixed.
Read the article →