Skip to content
Back to the playbook

Diagnosing ingress-nginx 504 Gateway Time-out

NGINX Ingress ControllerKuberneteskubectlrevision 1

Diagnostic tree

  1. In progressIngress returns 504 Gateway Time-out under load504 from ingress-nginx means nginx itself gave up waiting for (or never found) a working backend — it's not the backend actively returning an error. The exact log message splits this into two genuinely different causes.
View the whole map (7 more steps)
  • Check the ingress-controller's error log for the exact upstream message
  • Is the backend genuinely slow, or is nginx's timeout just too low for it?
  • Fix: raise this Ingress's proxy-read/send-timeout
  • Root cause: backend contention under load, not a timeout setting
  • Are the backend pods actually Ready?
  • Root cause: the Service has no Ready backend pods
  • Root cause: endpoints exist but traffic can't reach them

What to test

Ingress returns 504 Gateway Time-out under load

504 from ingress-nginx means nginx itself gave up waiting for (or never found) a working backend — it's not the backend actively returning an error. The exact log message splits this into two genuinely different causes.

What happened?