Intermittent XenDesktop Registration Failures in Windows 7 Virtual Desktops

Intermittent XenDesktop Registration Failures in Windows 7 Virtual Desktops

book

Article ID: CTX133768

calendar_today

Updated On:

Description

XenDesktop 5+ Virtual Delivery Agent (VDA) registration intermittently fails because of timeout exceptions. The following event is logged on the virtual desktop when the failure occurs.

Event ID: 1002

The Citrix Desktop Service cannot connect to the delivery controller 'http://XenDesktopDDC.domain.local:80/Citrix/CdsController/IRegistrar' (IP Address '192.168.2.1’)

Error Details

Exception 'The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.' of type 'System.TimeoutException'

In a network trace taken from the virtual desktop, the following pattern is observed where the TCP Window Update packets preclude the one-minute timeout:

User-added image

 

Running ‘netsh int tcp show global’ on the virtual desktop showed that the Receive Window Auto-Tuning Level was ‘disabled’:

Querying active state...
TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State : enabled
Chimney Offload State : automatic
NetDMA State : enabled
Direct Cache Acess (DCA) : disabled
Receive Window Auto-Tuning Level : disabled
Add-On Congestion Control Provider : none
ECN Capability : disabled
RFC 1323 Timestamps : disabled

Where the same parameter was set to ‘normal’ on the Desktop Delivery Controller (DDC):

Querying active state...
TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State : enabled
Chimney Offload State : automatic
NetDMA State : enabled
Direct Cache Acess (DCA) : disabled
Receive Window Auto-Tuning Level : normal
Add-On Congestion Control Provider : ctcp
ECN Capability : disabled
RFC 1323 Timestamps : disabled

Comparing the preceding results to a default Windows installation showed that everything was set to default, except the VDA’s Receive Window Auto-Tuning Level.

Resolution

To prevent the issue, the Delivery Controller and VDA must have matching Receive Window Auto-Tuning Levels. Run the following command to set this parameter:

netsh int tcp set global autotuninglevel=normal

When both Delivery Controller and VDA have the same Receive Window Auto-Tuning level, the endpoints will be able to negotiate the TCP window size, which prevents TCP window size to throw any timeout exceptions.


Problem Cause

When large messages are sent in a WCF contract, and the Receive Window Auto-Tuning Level is enabled, Windows attempt to scale the TCP window size to optimize the amount of packets sent. If this parameter is enabled on one side of the conversation and disabled on the other, it can cause the connection to timeout while the sender waits for the recipient to accept the larger packets.
 

Issue/Introduction

Registration failures caused by disabling TCP 'Receive Window Auto-Tuning' with Windows 7 virtual desktops.

Additional Information

Speedguide.net article on TCP Receive Window Auto-Tuning Level

MSDN Forum on WCF timeout exceptions

Description of the Receive Window Auto-Tuning feature for HTTP traffic on Windows Vista-based computers