Running out of Ports

  • I've got a SQL Server 2008 R2 Cluster (Windows Server 2008 R2) and I keep running out of ports. If i do a netstat -an I can see there are multiple TCP connections with a state of TIME_WAIT from the active node IP to the virtual server IP.

    After adding replication this seems to just use up all the ports, is there some way to enable connection pooling so it doesnt keep opening more and more

    This doesnt seem to be an issue with incoming connections as there is only one application running and that does use connection pooling, and stopping all agent jobs seems to reduce the number of TIME_WAIT connections

  • TIME_WAIT is not necessarily and indication of a problem from a TCP-IP perspective, it indicates an open, established and available connection, that is all. The two end points in question have an established connection that is waiting for further activity before timing out, that is all. If you are seeing blocking or other connection issues that is a very different concern but your netstat results do not indicate an immediate problem.

    If you have a large number of TIME_WAIT connections you may want to be sure that the client application is closing connections when done with them.

    Joe

  • Thanks Joe,

    My problem is that I dont think this is anything to do with the client application its SQL server (active node) talking to SQL server (virtual server). And happens when I add in replication so i think its SQL Agent talking to SQL Server

    We limit MaxUserPorts to 300 and the same on the firewall and dont want to increase this range for security. Unless someone knows of a way to limit external connections but not internal

  • I'm having the same issue. Have snapshot replication set up on the publisher and I'm seeing almost 10,000 TCP ports used. btw, this is not even when replication is active. It's snapshot, set up to go off at midnight. I'm looking now in the middle of the day.

    netstat -an shows the local address as the active node in the cluster and the foreign address as the SQL cluster address:

    Local Address Foreign Address

    10.1.0.105:65217 10.1.0.108:1433

    There are almost 10,000 of these

    Why would replication cause the active node to open 10,000 TCP connections to the cluster address? Any ideas would be appreciated. Thanks for the post emma!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply