Upgrading DTC to Close Idle Connections

ID: Q197810

The information in this article applies to:

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

Microsoft Distributed Transaction Coordinator (DTC) coordinates distributed transactions using the two-phase commit process. A DTC transaction manager implements the two-phase commit process by exchanging two-phase commit messages with the other DTC transaction managers participating in the transaction. These two-phase commit messages flow over connections that the DTC transaction managers establish with one another. To conserve network resources, a transaction manager establishes a network connection only when it is needed. If a connection remains idle for a certain amount of time, the transaction manager closes the connection. Transaction managers monitor the state of the connections by exchanging periodic ping messages. These ping messages ensure that the connection is still available. They are also used to detect when a connection is idle. After a certain number of pings have been exchanged while no transactions are active on the connection, the idle connection will be closed.

CAUSE

A problem in the code caused the connections to be inadvertently held open for up to 10 hours. This problem is corrected in Hotfix 0655a which allows connections to be held open for 10 minutes rather than 10 hours.

In addition to correcting this problem, DTC now provides the ability to control both the ping frequency and the time an idle connection will remain open.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Transaction Server version 2.0. A supported fix is now available, but has not been fully regression- tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Product Support for more information.

MORE INFORMATION

Where to Get This Release

Please contact Microsoft Product Support for this update (Hotfix 0655a).

Who Should Install This Release

You should install this release if you want idle Microsoft DTC connections to be closed in 10 minutes rather than 10 hours or if you need the ability to manually configure these settings.

The idle connection timeout problem exists on all versions of MS DTC, but you should install this release only if you are running the Microsoft DTC file version 1997.11.532.0 or later. The 1997.11.532.0 version of Microsoft DTC was released as part of the Windows NT 4.0 Option pack release and the Microsoft Transaction Server 2.0 release.

You can determine which version of MS DTC is installed on your system by using Windows NT Explorer. In Windows NT Explorer, select the Winnt\System32 directory. Right-click Msdtc.dll, click Properties, and then click the Version tab. Explorer will display the file version for the Msdtc.dll file.

How to Apply the Hotfix

1. Create an empty temporary directory on your system.

2. Run the self-extracting executable file (I0655a.exe (i386) or A0655a.exe

   (alpha)) and type the name of the temporary directory when you are
   prompted to do so.

   The program will unzip the following files into the temporary directory:

      Dtccm.dll
      Qfe0655a.txt

3. Stop the Microsoft DTC Service, if it is running. Stop all services that
   depend on MS DTC (including Microsoft Transaction Server, Microsoft SQL
   Server, Microsoft Message Queue Server, and Microsoft COM
   Transaction Integrator (COMTI)).

4. Close Windows NT Control Panel, if it is open.

5. The Dtccm.dll that you must replace is located in the Winnt40\System32

   directory by default. You should first rename the existing Dtccm.dll so
   that you can return to it later, if you need to.

6. Copy the Dtccm.dll file to the Winnt40\System32 directory.

7. Restart the MS DTC Service and all services that depend on it.

How to Configure the Settings

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.

With this hotfix you can control both the ping frequency and the time an idle connection will remain open. The default is to ping every 6 seconds for 100 pings yielding a 10 minute timeout. To customize these settings, perform the following steps:

1. Start Registry Editor (Regedt32.exe).

2. Locate the following key in the registry:

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC

3. On the Edit menu, click Add Value, and then add the following registry
   values:

      Value Name: CmPingFreqSecs
      Data Type:  REG_DWORD
      Value: 6
      IMPORTANT: The CmPingFreqSecs should not be changed from its default
      value of 6 seconds. Values other than 6 seconds can destabilize DTC.

      Value Name: CmMaxIdlePings
      Data Type:  REG_DWORD
      Value: > 1
      Set the default value for CmMaxIdlePings to some value greater
      than 1. The default of 100 pings causes connections to time out in
      10 minutes.

4. Quit Registry Editor.
Keywords          : kbbug2.00 
Version           : WINNT:2.0
Platform          : winnt
Issue type        : kbbug
Solution Type     : kbfix

Last Reviewed: December 29, 1998