Skip to main content
Inspiring
June 9, 2025
Answered

Too many established TCP ports

  • June 9, 2025
  • 1 reply
  • 5213 views

I have a server running 7 instances of CF (6 sites plus root instance).  If I run a NetStat, I generally see about 1800 ports as "ESTABLISHED"  (see below for a sample).  Why so many ports connected to itself?

 

Ultimately what happens is the server just kind of dies because it can't establish any more sockets.  I don't think it's "port exhaustion" because I see the total number of connections staying around that 1800 mark, and there aren't piles of TIME_WAIT entries.

 

What I THINK is happening, is, as this issue is cycling through ports, it gets to a 65535 ceiling and is not looping back to lower ports, thus killing connectivity.

 

Any thoughts on what's going on here?

 

TCP 127.0.0.1:49890 site01-wf:49891 ESTABLISHED
TCP 127.0.0.1:49891 site01-wf:49890 ESTABLISHED
TCP 127.0.0.1:49892 site01-wf:49893 ESTABLISHED
TCP 127.0.0.1:49893 site01-wf:49892 ESTABLISHED
TCP 127.0.0.1:49894 site01-wf:49895 ESTABLISHED
TCP 127.0.0.1:49895 site01-wf:49894 ESTABLISHED
TCP 127.0.0.1:49896 site01-wf:49897 ESTABLISHED
TCP 127.0.0.1:49897 site01-wf:49896 ESTABLISHED
TCP 127.0.0.1:49898 site01-wf:49899 ESTABLISHED
TCP 127.0.0.1:49899 site01-wf:49898 ESTABLISHED
TCP 127.0.0.1:49900 site01-wf:49901 ESTABLISHED
TCP 127.0.0.1:49901 site01-wf:49900 ESTABLISHED

    Correct answer RockerNJ

    Very interesting to hear. Looking forward to further news as it becomes available. 


    Just a followup for you guys since you've all been awesome with helping.  Updating these settings seems to have fixed the problem (at least so far).  No crashes since making the update!

     

    netsh int ipv4 set dynamicport tcp start=32767 num=32768

    netsh int ipv6 set dynamicport tcp start=32767 num=32768

     

    and a registry edit:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

    TcpTimedWaitDelay

    REG_DWORD

    Value: 30

    1 reply

    BKBK
    Community Expert
    Community Expert
    June 10, 2025

    First of all, what is your:

    • Operating System?
    • ColdFusion version and update level?
    RockerNJAuthor
    Inspiring
    June 10, 2025

    Windows Server 2022 Datacenter

    Coldfusion 2021 + Hotfix20

    Charlie Arehart
    Community Expert
    Community Expert
    June 19, 2025

     

    This is the graph of cloudwatch metrics.  You can see the places highlighted are where the reporting just drops out when the server gets in that bad state.  The graph bottoming out right after is just me rebooting the box.  Then things run fine for a day or two, and it dies again.

     

     


    Ok, thanks. So the error from the event logs along with the graphs do support a contention that the problem is indeed still the port/connection issue. Again, I just wanted to make sure (for all our sakes) that this was indeed still the problem to be pursued.

     

    So now the question begged seems to be what is difference between your two servers, which you say seem configured alike, but only one has the problem.

     

    Are they identical with regard to hardware? And os configuration? And aws configuration? And cf version/update level and Java version used by cf? And how about the cf admin settings between the two servers? 

    /Charlie (troubleshooter, carehart. org)