Welcome! Log In Create A New Profile

Advanced

5000 connections to backends in TIME_WAIT state, nginx grows and starts swapping

November 30, 2010 03:30PM
Hi,

nginx version: nginx/0.7.67
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-proxy-temp-path=/var/tmp/nginx/proxy_temp
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
--http-log-path=/var/log/nginx-access.log
--with-http_gzip_static_module --with-http_ssl_module
--with-http_stub_status_module
--add-module=/usr/ports/www/nginx/work/nginx_upstream_fair-20090923
--add-module=/usr/ports/www/nginx/work/nginx_upstream_hash-0.3.1
--with-pcre

I have two freebsd 8.0 servers using carp, nginx listens on the carp
interface on both for high availability.

What I am seeing is that nginx opens 5,000 connections to the
preferred back end. I have a backup back end declared, but prefer one.
This causes nginx to grow in size, use a lot of swap, and die.

I've mitigated this by setting net.inet.tcp.keepidle=300000 on
freebsd. The connections go away after 5 minutes.

It's a pretty simple nginx.conf I use, and I'm not sure why I'm
getting this behaviour. Should I simply upgrade my nginx to latest?

Thoughts appreciated.


---


Stefan Caunter
cell: 416 561 4871
Skype: stefan.caunter

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

5000 connections to backends in TIME_WAIT state, nginx grows and starts swapping

stefancaunter November 30, 2010 03:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 318
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