Client Disconnects During Congestion over TCP and HTTP (235387)



The information in this article applies to:

  • Microsoft Windows Media Services 4.0

This article was previously published under Q235387
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

Windows Media Player clients may disconnect from a Windows Media Server during temporary congestion conditions. The client may disconnect from the server if the client does not receive any data for about two times the buffering time set on the client. This is about 10 seconds for a player set to the default buffering time of 5 seconds. This forces the client to start at the beginning of on-demand content after the stream is restarted.

CAUSE

The TCP stack in the server drops the connection to the client if it does not receive packet acknowledgements after a certain number of retransmissions.

TCP starts a retransmission timer when each outbound segment is handed down to the IP. If no acknowledgment is received for the data in a given segment before the timer expires, then the segment is retransmitted, up to the number of times specified in the TcpMaxDataRetransmissions registry setting. The default value for this parameter is 5.

The retransmission timer is initialized to 3 seconds when a TCP connection is established; however, it is adjusted "on the fly" to match the characteristics of the connection by using Smoothed Round Trip Time (SRTT) calculations as described in RFC793. The timer for a given segment is doubled after each retransmission of that segment.

WORKAROUND

Server administrators can increase the likelihood of keeping client connections alive in the event of temporary congestion by increasing the value of the TcpMaxDataRetransmissions parameter in the server registry. To do this, follow these steps:

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.
  1. Start Registry Editor (Regedt32.exe).
  2. Locate the following key in the registry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

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

    Value Name: TcpMaxDataRetransmissions
    Data Type: REG_DWORD
    Value: 6

  4. Quit Registry Editor, and then restart the computer for the changes to take effect.
The default value for this parameter is 5; increase the value gradually until you find the result that you want.

NOTE: Changes in this setting will affect all of the TCP connections performed by any application on the server computer.

MORE INFORMATION

For more information, visit the following Microsoft Web site:

Microsoft Windows 2000 TCP/IP Implementation Details
http://www.microsoft.com/technet/itsolutions/network/deploy/depovg/tcpip2k.mspx


Modification Type:MajorLast Reviewed:2/8/2006
Keywords:kbpending kbprb KB235387