We run a high traffic website. Over the past few days, we've had several customers complain of sporadic downtime that we cannot reproduce. We have several web servers elected to receive traffic from our load balancer, and while investigating I realized that all severs were dropping over 20 connections per second. A sample of connections from one sever looked like this:
38452 TIME_WAIT
7815 ESTABLISHED
570 FIN_WAIT2
105 FIN_WAIT1
101 LAST_ACK
36 SYN_RECV
25 CLOSING
4 SYN_SENT
2 CLOSE_WAIT
1 Foreign
Our configured port range is currently set to 15000 61000
on all servers. It would appear, then, that all possible ports must be getting exhausted since the number of connections either established or waiting to close is equal to 46267.
While we investigate traffic, what should we do about the dropped connections? Might it be wise to increase our port range? Decrease the amount of time closing connections wait? Both? Would doing either have any potentially negative consequences?