Remote Desktop Session to AWS Intermittently Freezes with UDP

Remote Desktop Session to AWS Intermittently Freezes with UDP

Release Date: 09/15/2022

Our Netcellent servers are hosted with Amazon Web Services (AWS), and this is a great decision because we are able to get rid of our server room which costs in electricity alone about $1,000 a month. In addition, we have a much more reliable environment to host our servers that can be easily backed up. The server resources can be expanded easily based on our needs. It was a great decision to move our servers to the cloud.

All of our servers are running as a terminal server and we access them through RDP (Remote Desktop Protocol). This has been working out well until about one year ago, when we noticed that from time to time the RDP session would freeze. The screen stops updating. However, what I type and my mouse clicks are still being sent. No error message is shown whatsoever -- the screen simply freezes. To make it work again, I have to disconnect and re-connect the session. Everything that I typed and/or clicked while it was frozen is there.

This problem affects some of our staff members, but not everyone experiences this issue. At first, we tolerated this problem until it became increasingly bad. So we researched and found the following article:

The nature of the issue is that with certain Windows 10 or 11 updates, the Remote Desktop Client seems to have problems handling the screen refresh function correctly in heavy network traffic conditions. RDP protocol is different from TCP in that TCP will guarantee the delivery of the network packet while RDP does not. On the other hand, RDP protocol is faster because there's no need to wait for acknowledgement from the other end. Therefore, RDP is the typical protocol to use for video streaming.

The work-around method is to disable RDP protocol for the Remote Desktop on the client side.  The following is an excerpt from the above article. But I modified it somewhat because the registry path in the article does not exactly match my local machine. So I changed it.  After applying the following solution, I verified that from the RDP session the AWS server does not freeze anymore.

I also ran into this issue since July 2019 on a Windows 1903 acting as the client machine. The following workaround on the client works for me, so the RDP no longer freezes.

Bring up regedit and navigate to the following location: 
    \\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client
Add a REG_DWORD entry: fClientDisableUDP and set the value to “1”.  See below sample screen:

This is to disable UDP protocol with RDP connection. UDP protocol is faster than TCP. But UDP may drop packets under heavy traffic. It is a work-around method to Windows RDP client issue.

After making this change in registry, close and reopen all your RDP sessions on your client computer to restart the Remote Desktop Client (mstsc.exe, aka Microsoft Terminal Services Client) application.

I'm waiting for a final fix to this issue.

In the article, there are further discussions on this subject:

Speculated Causation

  • Seems to occur primarily when using the UDP protocol under load.
  • My guess is that the RDP protocol has lost some of its resilience to packets getting lost or out-of-order.

RDP seems to behave a lot better with TCP than UDP. Switching to TCP-only does seem a bit more laggy, but the lag is more ordered (which is strangely nicer than the erratic lag) and I've yet to encounter an indefinite hang.



EMK



    • Related Articles

    • Remote Desktop Workstation Name

      Release Date: 6/19/17 Q - This is related to the Remote Desktop Configuration. I see that the system wants to set up a workstation ID for each user (local or remote). When the same user might work both from local and remote workstations, should the ...
    • How to Map Local Drive in Remote Desktop to Print Label at Remote Warehouse

      Release Date: 8/8/2018 For Elliott users who have a remote warehouse, the easiest solution to let warehouse users have access to Elliott is to let them use a remote desktop to login to the terminal server hosted at the user's location. While the ...
    • Disk Write Back Latency Issue with AWS Servers

      Release Date: 02/10/2022 Version: All For the past two-plus years, Netcellent has migrated all of its in-house servers to AWS (Amazon Web Services). We also help some of our customers in implementing their servers on AWS. We can advise you that ...
    • How to Authorize RDP/Terminal Server Session for Credit Card Processing

      Release Date: 3/25/2020 Version: 7.5 & Up Q: What is the best method for authorizing individual RDP/Terminal server Elliott sessions for processing credit cards? A: You will login to that user’s window session on the terminal server, and then login ...
    • Does Elliott Support Desktop Virtualization?

      Q: Do you have clients that have gone the desktop virtualization route with the current V7.54? Has that been smooth? Any issues with multiple printers? Things to watch out for to give us a head's up? A: We do have users that have implemented desktop ...