I'm using nginx as reverse proxy, and find more than 30k TIME_WAIT state ports in upstream server. I know my servers are "out of ports" which discussed here(http://nginx.org/pipermail/nginx/2009-April/011255.html), and set both nginx and upstream server to reuse TIME_WAIT and to recycle more quickly. …… net.ipv4.ip_local_port_range = 1024 65000 net.ipv4.tcp_tw_recycle = 1 neby mowaken - Nginx Mailing List - English