Clients get 503s with body `upstream connect error or disconnect/reset before headers. reset reason: overflow`, and Envoy logs show flag `UO`.
AdvancedTroubleshootingReliability Patterns in Production
Answer
Likely causes → The Istio/Envoy circuit breaker tripped: the DestinationRule connectionPool limits (maxConnections, http1MaxPendingRequests, http2MaxRequests) are lower than the current concurrency. UO means upstream overflow.
Diagnose →
kubectl get destinationrule -n shop inventory -o yaml
kubectl exec -n shop deploy/checkout -c istio-proxy -- \
pilot-agent request GET stats | grep -E "upstream_rq_pending_overflow|upstream_cx_overflow"
Fix → If the limit is protecting a genuinely saturated service, it is working; fix capacity. If the limits were set too low, raise them based on Little's Law (RPS x latency) with headroom.
Prevent → Size connection pool limits from load tests and alert on overflow counters.
More on Reliability Patterns in Production
NGINX ingress returns 504 and logs `upstream timed out (110: Connection timed out) while reading response header from upstream`.BeginnerAfter a 30-second database blip, Postgres keeps rejecting connections with `FATAL: sorry, too many clients already` for 20 minutes.AdvancedCustomers were charged twice during an incident where the payment API timed out.AdvancedEvery rolling deploy produces a short burst of 502s on the AWS ALB.IntermediateRedis restarted and immediately the database CPU hit 100% and the site went down.AdvancedLogs fill with `CallNotPermittedException: CircuitBreaker 'inventory' is OPEN and does not permit further calls` long after inventory recovered.Intermediate