We have several Windows 2008R2 servers which run a variety of commercial (e.g. SQL Server) and in-house applications. It's a variety of virtual and physical, all of which have been running for some years without any problems.
However, in the last few weeks a few servers have suddenly stopped being able to establish new network connection. An example of this is one of our applications that connects to SQL over a normal socket connection - it simply hangs. Trying to browse to a network share from the affected server tells us
The name limit for the local computer network adapter card was exceeded
This looked like good old fashioned ephemeral port exhaustion to me, and bumping up the number of ephemeral ports temporarily resolves the problem
However, even with this in place the server only lasts a few days before the problem recurs. Moreover, I can't see what's consuming any great number of ports - again, nothing has changed on the servers, and the problem has happened on 4 different boxes running different types of application.
If I look at the busiest server, running SQL Server 2014, in TCPView we're showing around 1000 connections:
I've run this script which logs ephemeral port usage, and it never goes above a few dozen ports.
Process Explorer doesn't show anything exciting either:
My gut feeling is that something in the July's "patch Tuesday" has caused this, but I could be completely wrong. All we know is that previously working servers now stop working after a few days, everything is patched up to date (both in terms of Microsoft and vendor drivers), it's affecting multiple servers, both physical and virtual, and there's no sign of anything burning through ephemeral ports. Can anyone suggest how to isolate what's causing the issues?



ESTABLISHED(the majority) orTIME_WAIT(only around 20) – KenD Aug 21 '17 at 07:19-aoption with netstat to show "all" connections? Also recommend using-ofor the owning process ID, but sometimes this is 0 for orphaned connections. I typically use-ano– Clayton Aug 22 '17 at 18:51-ano. I have a server in it's "problematic" state at the moment - it's an hour before "end of business" here and the time when I can bounce it.netstat -anoreports there are 874ESTABLISHEDconnections, 17TIME_WAITconnections and 39LISTENING. If I usenetshto bump up the ephemeral port range, the problem disappears - but I'm running out of ports I can allocate to it. – KenD Aug 22 '17 at 19:02