美文网首页
Windows TCP/IP 连接数限制

Windows TCP/IP 连接数限制

作者: _后羿射日 | 来源:发表于2020-12-04 10:30 被阅读0次

    From:https://support.solarwinds.com/SuccessCenter/s/article/NETSTAT-A-command-displays-too-many-TCP-IP-connections?language=en_US

    NETSTAT -A command displays too many TCP/IP connections

    Running the NETSTAT -A command from the command prompt shows a large number of TCP/IP connections established by the ipMonitor software. If ipMonitor is unable to open new connections, monitor failures can occur.

    Overview

    Running the NETSTAT -A command from the command prompt shows a large number of TCP/IP connections established by the ipMonitor software. This increased network traffic can affect ipMonitor's ability to create new connections, especially since many existing TCP/IP connections remain in a reserved TIME_WAIT state. Ultimately, if ipMonitor is unable to open new connections, monitor failures can occur.

    Environment

    ipMonitor 10.8;ipMonitor 10.x

    Cause

    The majority of TCP/IP connections displayed are ephemeral ports that have already been closed, but that remain reserved before they can be reused. This reserved state is denoted by the netstat TIME_WAIT label.

    Microsoft limits the number of connections to 3975 by default, meaning that there can only be 3975 TCP/IP connections open at any given time. In addition, the TIME_WAIT state is configured by default to be 240 seconds. This means that Windows can only support an average of 33 TCP/IP connections per second. ipMonitor must then wait 240 seconds before being able to reuse those connections. If you have a large number of configured Monitors set to retest resources at short intervals, 3975 connections every four minutes may not be enough.

    Resolution

    Warning: Windows registry changes can result in severe system damage if performed incorrectly. Before you modify the registry, make a backup copy and ensure you understand how to restore the registry if a problem occurs. 

    Attempt the troubleshooting steps in the following order:

    Increase the refresh time between monitor tests 

    If possible, SolarWinds recommends configuring your monitors to use the default value of 300 seconds between monitor tests. This optimal setting ensures there are enough TCP connections available when needed.

    Increase the maximum simultaneous connections 

    Start the Registry Editor(Regedt32.exe).

    Access the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

    Add a DWORD value to this registry key:

    Name: MaxUserPort

    Type: DWORD

    Value: 65534 (decimal)

    Exit the Registry Editor.

    Note: This section can also be used as reference during large Server & Application Monitor (SAM) installations.

    Reduce the duration of the Reserved State 

    Reducing the value of the TIME_WAIT state results in TCP connections being reused faster, therefore allowing for an increased number of connections during the same length of time. Note that if the value is too low, the TCP connection may close before monitor testing is complete.

    Start the Registry Editor (Regedt32.exe).

    Access the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

    Add a DWORD value to this registry key:

    Name: TcpTimedWaitDelay

    Type: REG_DWORD - Time in seconds

    Value: 120 (decimal)

    Exit the Registry Editor.

    Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.

    相关文章

      网友评论

          本文标题:Windows TCP/IP 连接数限制

          本文链接:https://www.haomeiwen.com/subject/ngmbwktx.html