How to configure a Remoteapp server to increase stability

22,259

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.

Share:
22,259

Related videos on Youtube

Lorenz Meyer
Author by

Lorenz Meyer

Allround IT specialist: PHP, VBA and JavaScript programmer Help Desk Network administrator (MCSA) Database administrator (MCDBA)

Updated on September 18, 2022

Comments

  • Lorenz Meyer
    Lorenz Meyer over 1 year

    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 ?

    • MikeAWood
      MikeAWood over 10 years
      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?
    • Lorenz Meyer
      Lorenz Meyer over 10 years
      I found where to look: Event Viewer, Applications and Services Logs\Microsoft\Windows\TerminalServices-LocalSessionManager\‌​Operational.
    • MikeAWood
      MikeAWood over 10 years
      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?
    • Lorenz Meyer
      Lorenz Meyer over 10 years
      @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.
    • hyp
      hyp over 10 years
      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
    • Michael Hampton
      Michael Hampton over 10 years
      Setting the keep-alive is definitely the first thing I would do here. @hyp you should probably make a full Answer out of that.
    • Lorenz Meyer
      Lorenz Meyer over 10 years
      @hyp : Thanks, I immediatly test this out. I set the keep-alive connection interval to 1 minute.
  • Lorenz Meyer
    Lorenz Meyer over 10 years
    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
    Lorenz Meyer over 10 years
    Maybe you have another tip ? I saw on other answers, you seem competent.
  • hyp
    hyp over 10 years
    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.