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

ID: Q233082


The information in this article applies to:
  • Microsoft Windows NT Server version 4.0, Terminal Server Edition

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

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:

Q152734 How to Obtain the Latest Windows NT 4.0 Service Pack
Q190162 Terminal Server and the 2048 Open File Limitation
Q231798 Access Database with Multiple Users Slow on Terminal Server
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

To enable the new functionality, perform following steps:
  1. Ensure that the server is running SP4 or later.


  2. Start Registry Editor (Regedt32.exe).


  3. Locate the following key in the registry:
    
       HKEY_LOCAL_MACHINE\\SYSTEM\CurrentControlSet\Services\Rdr\Parameters 


  4. On the Edit menu, click Add Value, and then add the following registry value:


  5. 
       Value Name: MultipleUsersOnConnection
       Data Type:  REG_DWORD
       Value:      0 
  6. Quit Registry Editor.


Additional query words:

Keywords :
Version : winnt:4.0
Platform : winnt
Issue type : kbprb


Last Reviewed: August 3, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.