Skip to content
MtrXTools

no live upstreams while connecting to upstream

Every backend server is marked as down

Seen in nginx error log (shown to visitors as 502 Bad Gateway)

All servers in the upstream group have failed recently, so nginx has none left to send the request to.

Common causes

  • Every backend crashed or became unreachable at once.
  • Backends failed max_fails times and are inside their fail_timeout window.
  • Errors earlier in the log (refused, timed out) caused nginx to mark them unavailable.

How to fix it

  1. Look further up the error log for the first connect or timeout errors and fix the backends.
  2. Check each server listed in the upstream block is up and reachable from the nginx host.
  3. Review max_fails and fail_timeout on the server lines if healthy backends are marked down too eagerly.

Got a different message? Paste it into the error explainer.

Related errors

All 19 Web servers & certificates errors