Very handy to have about keeping IIS6 streamlined, and outgoing socket connections
adjustable.
So when BTS is busy crunching away and creating sockets to various endpoints.
On a current project, we use a ‘helper’ class to talk to an ERP system (pronto) and
the helper class creates (& destroys upon cleanup) a socket with each instaniation.
Problem is that Windows will not immediately return the discarded socket back to the
socket pool for up to 2 mins (due to slow networks etc. and the TCP setup needs to
be fully ‘flushed’ as I understand)
The issue is – in busy times within the registry there is a value that says – the
user (aka BTS) can only create 5000 socket connections at any one time. 1024 are already
taken in the well known port space (esp. on a server) so we found we were hovering
around the 3900 active connections at once…till things went bad.
These settings below – one for IIS accepting/servicing a higher number of socket connections
and the other is for outgoing user connections.
It’s always interesting moving these bottlenecks along….to see what the next component
that presents itself as the bottleneck.
Enjoy.
MaxConnections (HTTP.SYS)
Controls the number of simultaneous HTTP connections (and hence limits number of simultaneous
connections serviceable by IIS6).
- On Windows Server 2003 RTM x86, this comes out to around 8,700
- On Windows Server 2003 SP1, the limit has been removed
-
On Windows Server 2003 SP1 x64, since NPP is bound by available memory, you can increase
concurrent connections by merely adding more RAM.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters
Type: DWORD
Value: Range from 0 to 2^32-1
MaxUserPort (TCPIP.SYS)
Controls the max port number that TCP can assign. Every unique client making a request
to your web server will use up at least one of these ports on the server. Web applications
on the server making outbound SQL or SMB connections also use up these ports
on the server… so it highly affects the number of concurrent connections.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters Type: DWORD Value: Range from 5000 to 65536