Performance issues due to Inactive Terminal Server Ports

Good morning AskPerf! There are several issues that have been associated with a high number of inactive Terminal Server ports. Delayed logon times to RDP sessions, failure of printers to redirect, and slow server performance due to registry bloat from all the ports. These inactive TS ports accumulate because the Remote Desktop Services Device Redirector service creates a new port every time an RDP session is established, but the ports are not always recycled. Every RDP session can possibly create a new port, and every ended session means a new inactive port. Performance degradation is known to occur when 250 or more TS ports exist in the registry. Increasingly large numbers of redirected devices will exacerbate performance delays.

Because the Hotfix and the FixIt perform two different functions, you must install the Hotfix and run the FixIt one time on your 2008 R2 Remote Desktop Server.

For down-level operating systems such as Server 2003, Server 2008 Terminal Servers and Windows 7 in a VDI scenario, we highly recommend a scheduled task be created to execute the Inactive TS Port FixIt on a bi-weekly basis, since the hotfix only supports Windows Server 2008 R2 at this time.

The FixIt is an MSI package so you can run it silently with no user interaction required. Follow these simple steps:

1. Locate the MSI file in Windows Explorer and note the exact path to it

2. Click Start and type in the following:

msiexec /package “path” /quiet

For example, if the MSI file MicrosoftFixit50833.msi is located in the “temp” folder of your C drive, then the path would be C:\temp\MicrosoftFixit50833.msi and the command would look like this:

Hotfix aside, what is the expected behavior of registry key in question? When no one is logged in should there be no subkeys, etc? Is the issue that the subkeys are not properly being purged at logoff?

Patrick the keys don't get purged and will accumulate into the thousands depending on how many users you have running on the Terminal Server. This is a very old issue that goes back to Server 2000 and maybe earlier. As Blake said above every time a TS session starts and Client Printing is Turned on (Now called Windows Printer Redirection) these will be created. If you use Network Printing only in the Terminal Server Environment they do appear (Now shown as Windows Printer with a check box DISABLE under RDP-TCP Properties for the Terminal Services Configuration. In Server 2000 when we first saw this issue 12 years ago we would manual clean them out and delete all the keys. If you shut off Client printing (Disable in Server 2008) I think they will never return. These days many people work from home and so turning on Client Printing “Windows Printer Redirection” in Terminal Server these days is generally set on. When it is turned on as an example a 2008 server with 80 users can create about 600 entries in a day or two even if most of the users run Network Printers and don’t have a client printer the entries are still made. One day we estimated a server to have had 24,000 entries. Its important to use the fix listed on this page.

Scott if you are running Citrix it uses the Microsoft Backbone of Terminal Server. Citrix no longer can use the CODE for controls of the OS as per agreement back in the Early 90’s. This was after Terminal Server 4.0. Again if Client Printing is set on “now Called Printer Redirection” these will accumulate. If you use Graphon’s GO-GLOBAL www.graphon.com they have there own Server source Code which does not interface with any of the Windows Terminal Server Code like Citrix. This is one of the only Cloud Based software’s I know of that has written all of their own source code and so printing is done differently on that platform. As Jdickson289 has suggested open the registry and review the number of key entries accumulated for a definitive answer. Citrix does create there own HOT Fixes separate from Microsoft to address some of these issues.

@Steve Boer: Yes, it is safe to run while users are logged on as it only removes the inactive ports, not those currently in use.

Radu Goleanu

8 Jul 2013 7:06 AM

hi. at my work place we have windows 2003 server, and i have a lot of problems becouse print spool blocks RDP connections, and best i can do is to stop spoolsv and restart it. but problems occurs again in some hours. anything to do? i think this problem appeared when i installed a new hp printer "HP Officejet 6000 E609a Series". Sincer then i always have this problem. any optimal solution to solve this? Thanx!