Доброго времени суток.

Суть проблемы: пришел запрос, ушел на бекенд. Если бекенд не ответил за 2 
секунды , nginx перестает ждать и отправляет еще один аналогичный запрос на 
бекенд, который отвергает приложение ввиду того что все еще занято прошлым 
запросом(на таблицах висят локи и пр).

Вопрос: Почему nginx может не ждать выполнения а дублировать запрос спустя 2  
секунды.

Вот немного деталей.

nginx version: nginx/1.11.6
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
built with OpenSSL 1.0.1f 6 Jan 2014
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --with-cc-opt='-I /usr/include' 
--with-ld-opt='-L /usr/lib' --conf-path=/etc/nginx/nginx.conf 
--sbin-path=/usr/sbin/nginx --pid-path=/var/run/nginx.pid 
--error-log-path=/var/log/nginx/nginx-error.log --user=www-data 
--group=www-data --with-file-aio 
--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/nginx-access.log --with-http_perl_module 
--with-http_stub_status_module --with-pcre --with-http_ssl_module 
--add-module=/usr/src/ngx_devel_kit-0.2.19 
--add-module=/usr/src/lua-nginx-module --add-module=/usr/src/echo-nginx-module 
--with-debug --with-http_realip_module 
--add-module=/usr/src/nginx_upstream_check_module

client_max_body_size       300m;
client_body_buffer_size    128k;
proxy_read_timeout 180s;
proxy_send_timeout 180s;
proxy_connect_timeout   10s;
proxy_http_version 1.1;
proxy_set_header Connection keep-alive;
proxy_next_upstream error;
proxy_next_upstream_timeout 30s;


proxy_ignore_client_abort   on пробовал, не помогло.

Вот вывод strike детки которая обрабатывала запрос:  
http://pastebin.com/raw/HFP9tNNm  
Интересно что делал nginx между 23:32:10 и 23:32:12

Вот вывод debug лога:  http://pastebin.com/raw/SQhXKVQ9  

Куда копать дальше ? 

Спасибо.

-- 
Никита Маслянников
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Ответить