Microsoft KB Archive/233082

= Windows Terminal Server Clients May Randomly Hang for 35 Seconds or More =

Article ID: 233082

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Windows NT Server 4.0, Terminal Server Edition

-



This article was previously published under Q233082



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
Terminal Server clients may experience an intermittant loss of responsiveness or the client may appear to stop responding (hang) while running programs on the Terminal Server computer. This problem only occurs if one or more users try to gain access to files on other file servers on the network. When the client hangs, all user sessions connected to the Terminal Server computer are affected and the lack of responsiveness may last for 35 seconds or more.



CAUSE
This problem occurs because each Terminal Server client is typically allowed to have one outstanding command, such as a file open or read request to each remote server at a time. When a file operation, such as file open, is sent to a server for a file that is currently in use, the server may send a break oplock request to the client that has the file open. This allows the client owning the locked file a chance to flush any buffered changes before shared use is allowed.

In the case where the client issues a new file open request for a file it already has open, the redirector may temporarily deadlock when the break oplock is received from the server. After sending the oplock break request, the server gives the client 35 seconds, which is the default setting to respond. When the timeout occurs, the server responds to the new file request, breaking the deadlock.



RESOLUTION
To resolve this problem, install Windows NT Server 4.0, Terminal Server Edition Service Pack 4 (SP4). Service Pack 4 provides an option that forces each client to negotiate a session with all remote servers to which it is connected. The negotiation allows the server to specify the number of commands the client may have outstanding at a time, which by default, is 50.



MORE INFORMATION
On the Terminal Server computer, disabling the redirector parameter MultipleUsersOnConnection increases the number of outstanding commands from 1 to whatever number the server is able to support. Disabling this option also corrects problems in installations where Terminal Server clients run programs that open a large number of files or gain access to shared files, such as databases. The impact of this option is that additional memory is used by the redirector on the Terminal Server computer and on any servers to which the client is connected. The amount of memory used varies based on configuration and usage. Additionally, when a client first connects to a remote server, the client sends one or more negotiate commands and then connects to the resource. If the option is left at the default setting, only the first client connecting to a remote server goes through the negotiate process, all other clients immediately attempt to connect to the resource.

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

152734 How to Obtain the Latest Windows NT 4.0 Service Pack

190162 Terminal Server and the 2048 Open File Limitation

231798 Access Database with Multiple Users Slow on Terminal Server

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To enable the new functionality, perform following steps:  Ensure that the server is running SP4 or later. Start Registry Editor (Regedt32.exe).  Locate the following key in the registry:   HKEY_LOCAL_MACHINE\\SYSTEM\CurrentControlSet\Services\Rdr\Parameters   On the Edit menu, click Add Value, and then add the following registry value:   Value Name: MultipleUsersOnConnection Data Type: REG_DWORD Value:     0 </li> Quit Registry Editor.</li></ol>

Keywords: kbprb KB233082

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.