Interview Prep/SRE & Reliability/Reliability Patterns in Production

NGINX ingress returns 504 and logs `upstream timed out (110: Connection timed out) while reading response header from upstream`.

BeginnerTroubleshootingReliability Patterns in Production
Answer

Likely causes → The backend did not respond within proxy-read-timeout (default 60s): slow queries, a hung dependency, or a long-running endpoint that should be async.

Diagnose →

kubectl logs -n ingress-nginx deploy/ingress-nginx-controller | grep "upstream timed out" | tail
kubectl get ingress -n shop checkout -o yaml | grep -i timeout

Check the backend's latency and dependency traces for those requests.

Fix → Fix the slow backend path (timeouts on its dependencies, indexes, async jobs). Only raise nginx.ingress.kubernetes.io/proxy-read-timeout for endpoints that legitimately take long.

Prevent → Nest timeouts: backend dependency timeouts < backend request timeout < ingress timeout < client timeout.

All SRE & Reliability questions

More on Reliability Patterns in Production