Thomas Shinder Blog RSS

All Blogs  »  Thomas Shinder Blog  »  ISA Central  »  Blog article: Fix for Maximum Ports Issue

Fix for Maximum Ports Issue

This post refers to an interesting problem regarding the "no available ports" error sometimes seen on hammered ISA firewalls. The first post describes the ISA firewall admin’s problem and the second post describes a possible solution.

===============================

Every six weeks or so, I have had a strange problem that only happens to one of two ISA 2004 servers.  It starts loosing connectivity slowly and then crashes completely.  We have to restart the server and then everything is fine.

Since the last crash, I was able to log that I have actually run out of sockets.  Is there a fix?

The Web Proxy filter failed to create a network socket because there are no available ports on this computer. ISA Server already reset the maximal port number to 65535. Make sure this is the value at HKLM\System\CurrentControlSet\Services\TcpIp\Parameters\MaxUsePort and restart the computer to apply this change.
 
I do have that registry setting. Am I running out of sockets? Any explanation?

=================================

May be a solution for this problem.

Try lowering the TcpTimedWaitDelay to 30, which means that the connections will stay in TIMED_WAIT state for only 30 seconds instead of 240. This lowers the chance of the same port being reused by TCP.

Here are a couple of links about the matter:
http://www.winguides.com/registry/display.php/878/
http://technet2.microsoft.com/WindowsServer/en/Library/38b8bf76-b7d3-473c-84e8-e657c0c619d11033.mspx

This is Ori Yosef’s [MSFT] solution, from microsoft.public.isa (msnews.microsoft.com NNTP server)

I tried it, and my ISA Server worked without any errors more then 5 day’s.

HTH,

Tom

Thomas W Shinder, M.D.

Site: www.isaserver.org

Blog: http://blogs.isaserver.org/shinder/

Book: http://tinyurl.com/3xqb7

MVP — ISA Firewalls

 

4 Responses to “Fix for Maximum Ports Issue”

  1. rcon Says:

    June 28th, 2007 at 9:40 am

    I have same issue on my ISA 2006 Std server. It’s a very busy WEB/SMTP publisher with slow (2 mbps) internet connection. This tip reduced the overall rate of this type errors but not completely solved the problem. Hardware configuration is just fine. I suppose we need more tweaking on windows TCP/IP settings.

    Sorry for my english..

  2. rcon Says:

    June 28th, 2007 at 10:22 am

    I have found this KB article on microsoft website:
    http://support.microsoft.com/kb/321844

    CAUSE section is close to my setup. But is only for ISA 2000! What about 200x?

  3. paveld Says:

    July 15th, 2008 at 9:19 pm

    In my case this did’t solve problem.
    After i change “MaxUsePort” i have memory leak.
    After 5-6 days non-paged pool memory more than 128 mb and BSOD %)

  4. paveld Says:

    July 15th, 2008 at 9:24 pm

    sorry, when i change TcpTimedWaitDelay to 30, then i have BSOD

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

If CAPTCHA image is missing or you cannot read the characters above, please generate a




Receive all the latest articles by email!

Receive Real-Time & Monthly ISAserver.org article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become an ISAserver.org member!

Discuss your ISA Server issues with thousands of other ISA Server experts. Click here to join!

Solution Center