5

RemoteApp is Instable

According to my experience, Remote Desktop connections (especially RemoteApp connections) suffer from several instablities, which manifest themselves especially when using RemoteApp all day long.

There are several issues that affect stability and useability:

  1. Connection breaks inadvertly. When the application is idle for a while (about 30 min) and the user takes back control, the application is unresponsive. The connection to the server is broken. After a few seconds the Message The connection has been lost. Attempting to reconnect you to your session. appears. The reconnection is not always successful. These broken connections have nothing to do with Idle Timeout settings.

    The logs (Event Log, TerminalServices-LocalSessionManager) show the disconnection at the moment when the user clicks on the application which becomes unresponsive. Some connections reconnect (ca. 80%, others log off ca. 20%).

  2. Occasionally black screen on reconnection. Occasionally, when the a session is disconnected, and a user logs in again, he receives a black screen instead of the login screen (like here, here and elsewhere with different solutions). My settings: Disconnected sessions are logged off after 5 minutes.

Context

I have two Windows Server 2008 R2 with RDP and RemoteApp installed. I have Windows XP and Windows 7 clients that connect to it. The users run the RemoteApp all day long, but they may let the application idle during an hour or so.

What I did so far

Keepalive on server side improved disconnections

Thanks to @hyp, I got a step closer to a stable situation. I configured a keepalive on server side by configuring local group policy:

Computer Configuration -> Policies -> Admin Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections -> Configure keep-alive connection interval

The situation is better, but still not satisfactory. The connection still breaks inadvertedly, but less frequently (I get half the number of disconnections, and I did not get any more any help desk calls on this problem). Now, what happens is that the server notices when the connection is broken, disconnects the session and logs the user out. The user experience is now better, because the session breaks immediately when the network incident is happening, unlike before when the session broke only when the user interacted.

But, what I would like is that the Client Computer notices the disconnection and tries automatically to reconnect. This will avoid that the user need to login again.


Is it a general problem with RemoteApp that the connections are not reliable ? Does somebody make extensive usage of RDP and has this same problem ? Or are out there people that never encountered this ?

If RemoteApp is as sensitive to minor network perturbances, how do other cope with the problem ? If it is only as sensitive in my context, how to determine if the problem is with my server configuration or with my ISP ?

I there something else I could do to get even more stable RDP connections ?

Lorenz Meyer
  • 430
  • 2
  • 9
  • 25
  • Sounds to me like the connection is being interrupted at some point and the user is being disconnected, but MSTSC isn't reporting that until the user attempts to interact with the session. I'll bet if you look on the server they are logging into, you'll see the sessions being disconnected for some reason long before the user realizes it. And once it is disconnected, the client can't reestablish the connection for some reason. Both are issues you likely need to look at. What do the logs say? – MikeAWood Aug 14 '13 at 02:12
  • I found where to look: Event Viewer, Applications and Services Logs\Microsoft\Windows\TerminalServices-LocalSessionManager\Operational. – Lorenz Meyer Aug 14 '13 at 06:38
  • Hum... so server isn't registering that the user has dropped the connection. It sounds to me like something is limiting the connection time/data amount. I would point to a firewall and look there, but if it does it on the LAN, that is likely not the case. If you login to the server and look in task manager, does it show the session disconnected once the RDP session goes idle? meaning maybe it isn't logging it but windows is actually disconnecting it and the idle mstsc client isn't aware of it, or doesn't poll the server when not in use to save bandwidth? – MikeAWood Aug 17 '13 at 01:34
  • @MikeAWood Thanks. I wrote a program to analyse the event log. The first conclusions are : - I cannot distinguish between a disconnection due to a regular end of the application and a broken connection that could not be restored. - the frequence of disconnections is varying alot among clients. 0 up to 1.5 times per session and up to once every two hours. - I cannot recognize a pattern, but I did not yet relate the data to the OS. – Lorenz Meyer Aug 17 '13 at 06:16
  • 2
    Did you find a solution to your issue? If not then have you tried setting the following Group Policy: Computer Configuration -> Policies -> Admin Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections -> Configure keep-alive connection interval – hyp Aug 27 '13 at 14:46
  • Setting the keep-alive is definitely the first thing I would do here. @hyp you should probably make a full Answer out of that. – Michael Hampton Aug 27 '13 at 14:49
  • @hyp : Thanks, I immediatly test this out. I set the keep-alive connection interval to 1 minute. – Lorenz Meyer Aug 27 '13 at 14:54

1 Answers1

7

On suggestion I'm turning the comment into an answer.

As it sounds that you need some sort of keep-alive signal, there is one available for RDP connections but it is turned off by default. The setting which you're looking for is:

Computer Configuration -> Policies -> Admin Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections -> Configure keep-alive connection interval

Just make sure to apply it to your RDS servers and try it out, hopefully this will help.

hyp
  • 495
  • 4
  • 12
  • Since then I did not receive any reclamations from our clients. According to the statistics (Event log) the disconnections are reduced by half. Probably they are also less annoying for the clients, because the session disconnects at the moment when the network problem occurs, and not when the user interacts. I hope it would be possible to improve the situation even more... – Lorenz Meyer Sep 09 '13 at 13:11
  • Maybe you have another tip ? I saw on other answers, you seem competent. – Lorenz Meyer Sep 11 '13 at 12:23
  • Only trying to help. Right - have you looked through other options in the same scope of options in the Group policy editor? In the same location there is an another option named 'Automatic reconnection' which sounds like a thing you might need. – hyp Sep 11 '13 at 13:14