Welcome! Log In Create A New Profile


$upstream_status may show 502 even if upstream replied with 503

August 17, 2015 05:39PM
My nginx.conf:
http {

upstream test {
server max_fails=0;
server max_fails=0;

server {
listen 8080;
location / {
proxy_pass http://test;
proxy_next_upstream http_503;
proxy_intercept_errors on;

log_format main '$upstream_status';

If my upstream servers are on and always reply with 503 I expect to find in log
503, 503
Instead I find
502, 503
Is it ok that first upstream status is 502 instead of 503?

Can I somehow configure nginx to show 503?
Because in case of more complicated
proxy_next_upstream error http_503
it is more useful to see fair upstream status to distinguish between error and http_503.
Subject Author Posted

$upstream_status may show 502 even if upstream replied with 503

Anton Ivanov August 17, 2015 05:39PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 94
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready