Essbase API - Ephemeral Port Issues/Resources

One of the most popular posts on my blog has been the post where I showed how to open up the number of ports available to Essbase. This is necessary as the Essbase API is quite chatty and, when combined with the small number of available dynamic ports and the long default timeout on these ports in Windows, running out of ports has become an issue.  Most users see this when running many, many repetitive API calls against Essbase. 

One example is when users run the Essbase Outline Extractor against a large database.   Back in the old days when the Essbase API was designed, it probably wasn’t much of a consideration.  These days, however, with million member outlines and really fast computers, it is very easy to run out of ports.

We are currently testing some new Dodeca functionality we plan to introduce this summer that optionally performs some intensive caching of the Essbase outline.  Of course, we ran into the port issue very quickly and, in the course of looking at how the ports have changed in the new versions of Windows, found a couple of interesting links to pass along.

First, I found a nice link that explains how dynamic ports work.  Better yet, this link covers dynamic ports on non-Windows operating systems.  You can see this link at http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html.   This link also talks about the new, larger default dynamic port range in Windows Vista, Windows 7 and Windows Server 2008 which now feature a default range of 16,384 ports.

I also found a link to a Microsoft KnowledgeBase article that talks about the new defaults and shows ways to both display, and dynamically increase, the range of ports.  The KnowledgeBase article is located at http://support.microsoft.com/kb/929851/.   I ran the commands listed there on my Windows 7 laptop:

C:\Users\timt>netsh int ipv4 show dynamicport tcp
Protocol tcp Dynamic Port Range
---------------------------------
Start Port      : 49152
Number of Ports : 16384


I then increased the number of ports dynamically:

C:\Users\timt>netsh int ipv4 set dynamic tcp start=5000 num=60536
Ok.


C:\Users\timt>netsh int ipv4 show dynamicport tcp
Protocol tcp Dynamic Port Range
---------------------------------
Start Port      : 5000
Number of Ports : 60536


The changes appear to permanent.  I rebooted my machine and found the new configuration remained.