Hi! 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 10.0.0.2:8080 max_fails=3 fail_timeout=10; server 127.0.0.1:8000 backup; keepalive 6; } server { location / { proxy_pass http://backend; proxy_next_upstream error timeout invalid_header; etc. } 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? Thanks! JP
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
