Welcome! Log In Create A New Profile

Advanced

Странное поведение имени upstream-блока и fastcgi_next_upstream

Stepan Karamyshev
January 27, 2016 06:04AM
Добрый день!

Возник вопрос, в котором не удается разобраться:

nginx -V
nginx version: nginx/1.8.0
built with OpenSSL 1.0.1p-freebsd 9 Jul 2015
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I /usr/local/include' --with-ld-opt='-L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx-access.log --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --add-module=/usr/ports/www/nginx/work/nginx-push-stream-module-0.3.5 --with-http_realip_module --with-http_stub_status_module --with-pcre --with-http_spdy_module --with-http_ssl_module

Настроен блок апстрима:
cat _upstream.conf
upstream upstreamname {
server 10.9.2.4:9000 weight=8;
server 10.9.2.5:9000 weight=10;
server 10.9.2.6:9000 weight=8;
server 10.9.2.7:9000 weight=3;
keepalive 8;
}

В локейшнах стоит
fastcgi_next_upstream error timeout http_500;

Настроен формат лога:
log_format upstream_log $upstream_addr $upstream_response_time $upstream_status';

Иногда при релоаде nginx вижу в логе
10.9.2.7:9000, upstreamname 3.000, 0.000 504, 502
——
Первую часть записи я могу понять — сработал таймаут на fastcgi , прилетела 504. Но почему при next_upstream nginx пытается обратиться на _имя_ блока?..

PS: в "нормальной" жизни next_upstream отрабатывает корректно , пересылая клиента на следующий сервер.
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Странное поведение имени upstream-блока и fastcgi_next_upstream

Stepan Karamyshev January 27, 2016 06:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready