solved 2026-10-26 2380 views 38 votes

Should /metrics be public?

@nox
Junior Python Dev

Hit this after a routine bump.

Symptom: Should /metrics be public?

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?

7 replies

@ina
2026-10-26 23:03 UTC · 1 votes

minimal repro with ASGITransport would help more than screenshots.

@elias
2026-10-27 01:59 UTC · 6 votes

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

@cole
2026-10-27 12:13 UTC · 7 votes

orjson helped CPU a few percent; DB still the ceiling.

@mira_py
2026-10-28 03:38 UTC · 10 votes

check proxy_read_timeout before blaming uvicorn resets.

@yuna
2026-10-28 16:34 UTC · 8 votes

orjson helped CPU a few percent; DB still the ceiling.

@eng_1008_67
2026-11-23 01:58 UTC · 1 votes

check your workers first; each one duplicates logging handlers.

@nox_sre84
2026-11-23 18:00 UTC · 1 votes

paste the query and indexes; guessing is useless.

Reply

Login or register to reply.