Opened 12 years ago

Closed 12 years ago

#212 closed defect (worksforme)

persistent connections not being remapped

Reported by: Nevins Bartolomeo Owned by: somebody
Priority: minor Milestone:
Component: nginx-module Version: 1.2.x
Keywords: Cc:
uname -a: Linux hostname 2.6.32-346-ec2 #51-Ubuntu SMP Fri Jul 6 17:41:21 UTC 2012 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.2.3
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-pcre-jit --with-debug --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.2.3/debian/modules/chunkin-nginx-module --add-module=/build/buildd/nginx-1.2.3/debian/modules/headers-more-nginx-module --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-development-kit --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-http-push --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-lua --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-upload-module --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-upload-progress --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.2.3/debian/modules/nginx-dav-ext-module

Description

When using keepalive with least_conn in the upstream module if an upstream is marked down temporarily when it becomes active again the keepalive connections do not get remapped so the server never receives any connections if your connections per second are less then your keepalive connections:

upstream backend_boxes {

least_conn;

server 10.64.157.252;
server 10.9.5.195;
server 10.214.145.134;
server 10.108.77.171;
server 10.215.46.107;
server 10.210.134.54;

keepalive 30;

}

10.215.46.107 was marked down due too:

proxy_next_upstream error timeout http_502 invalid_header;

and after it came back up it is no longer receiving requests.

Change History (1)

comment:1 by Maxim Dounin, 12 years ago

Resolution: worksforme
sensitive: 0
Status: newclosed

I wasn't able to reproduce the issue, but it may be some variant of incorrect backend accounting which resulted in wrong number of connections stuck in a connections counter for a backend in question. This is expected to be fixed by 9bcf89ca78d2 (1.3.15+, 1.2.8+).

Note: See TracTickets for help on using tickets.