Fix “The name limit for the local computer network adapter card was exceeded”

One of the hyper-v cluster node became out of tcp sockets. We can’t migrate or update node or VMs under it. BTW,don’t think that this socket problem is hyper-v related. You can meet any windows server 2008/2012 machine.

Anyway, I started to investigate.
the server had over 20k timewait connections.
C:\>netstat -ano | find /c “TIME_WAIT”
20150

Most of the connections were TCP 80.. strange there is no IIS under it and it is running with system PID :)
C:\>netstat -ano | findstr “TIME_WAIT” | more


TCP 10.88.56.70:80 x.x.x.x:33023 TIME_WAIT 0
TCP 10.88.56.70:80 x.x.x.x:33023 TIME_WAIT 0
TCP 10.88.56.70:80 x.x.x.x:33023 TIME_WAIT 0
TCP 10.88.56.70:80 x.x.x.x:33023 TIME_WAIT 0
TCP 10.88.56.70:80 x.x.x.x:33023 TIME_WAIT 0
TCP 10.88.56.70:80 x.x.x.x:33023 TIME_WAIT 0

As it is a system process. tried my luck. To understand better whats going on TCP 80 .. It is a module of microsoft, WSMAN!!!
netsh http show servicestate

Server session ID: FF00000A20000002
Version: 1.0
State: Active
Properties:
Max bandwidth: 4294967295
Timeouts:
Entity body timeout (secs): 120
Drain entity body timeout (secs): 120
Request queue timeout (secs): 120
Idle connection timeout (secs): 120
Header wait timeout (secs): 120
Minimum send rate (bytes/sec): 150
URL groups:
URL group ID: FE00000A40000002
State: Active
Request queue name: Request queue is unnamed.
Properties:
Max bandwidth: inherited
Max connections: inherited
Timeouts:
Timeout values inherited
Number of registered URLs: 3
Registered URLs:
HTTP://+:80/WSMAN/
HTTP://+:5985/WSMAN/
HTTP://+:47001/WSMAN/

I had to increase the dynamic port range of the server in order to move VMs under it. Because no management service can talk to each other. Also DNS isn’t working.
So, Windows Server default dynamic port count is 16384
C:\>netsh int ipv4 show dynamicport tcp

Protocol tcp Dynamic Port Range
---------------------------------
Start Port : 49152
Number of Ports : 16384

Change the port range something you like. Afterwards, everything should work. You can open new connections. When you have your work done, reboot the server because old “time waits” always stays there :)
C:\>netsh int ipv4 set dynamicport tcp start=30000 numberofports=30000
Ok.

This problem can occur any windows machine which needs socket intensive communication. I just try to give you an example of what I met. So, windows file servers, windows application servers, or you ms-sql servers which can receive lots of tcp connections may face this problem.

Leave a Reply