Welcome! Log In Create A New Profile


No live upstreams

Posted by Jean-Paul Hemelaar 
Jean-Paul Hemelaar
No live upstreams
May 10, 2018 03:00PM

I'm using Nginx as a proxy to Apache.

I noticed some messages in my error.log that I cannot explain:
27463#0: *125209 no live upstreams while connecting to upstream, client:
x.x.x.x, server: www.xxx.com, request: "GET /xxx/ HTTP/1.1", upstream: "
http://backend/xxx/";, host: "www.xxx.com"

The errors appear after Apache returned some 502-errors; however in the
configuration I have set the following:

upstream backend {
server max_fails=3 fail_timeout=10;
server backup;
keepalive 6;

server {
location / {
proxy_pass http://backend;
proxy_next_upstream error timeout invalid_header;


I expected that, if Apache returns a few 502's:
- Nginx will not try to proceed to the next upstream as proxy_next_upstream
doesn't mention the http_502 but just forward the 502 to the client
- if the upstream is marked as failed (what I didn't expect to happen) the
server will try the backup server instead

What can be happening:
- If the primary server sends a 502 it tries the backup that will send a
502 as well. Because the max_fails is not defined it will be marked as
failed after the first failure.

Not sure if the above assumption is true. If it is, why are they marked as
failed even when the http_502 is not mentioned?


nginx mailing list
Sorry, only registered users may post in this forum.

Click here to login