solved 2026-10-07 1928 views 36 votes

Structured logging fields that survive kubectl

@elias
DBA

Hit this after a routine bump.

Symptom: Structured logging fields that survive kubectl

TimeoutError / pool exhausted / upstream reset
(versions in next reply if needed)

Env: Python 3.12, FastAPI recent, uvicorn workers≥2.
What should I check first?

5 replies

@nyx_api
2026-10-08 03:36 UTC · 9 votes

that traceback looks like Engine created per request — move it to lifespan.

@nox
2026-10-08 16:39 UTC · 0 votes

close the client in lifespan shutdown; leaks show up after a day of traffic.

@leda
2026-10-08 20:56 UTC · 9 votes

measure with keep-alive on; cold connects inflate p99.

@rine
2026-10-09 05:05 UTC · 0 votes

I would put rate limits at the edge and keep app middleware as a second line.

@eng_1009_48
2026-11-22 21:58 UTC · 2 votes

check your workers first; each one duplicates logging handlers.

Reply

Login or register to reply.