locked
RDP session hangs after 10-20 minutes of inactivity RRS feed

  • Question

  • This has gotten extremely frustrating for my company.  

    We work using RDP connections to our VM servers.  But we keep getting complaints about people losing connections after only 10-20 minutes of inactivity.

    We have already checked the Terminal Services connection times and we have it set to disconnect users after 6 hours of idle.  And we have it set to log off any session that has been disconnected for more then a minute.  Everything else is set to never.

    We have also adjust screensaver settings to never, adjust power management to never ask for any passwords, sleep and turning off the screen has also been disabled to never occur.  Keep-Alive is turned on and set to 2.  All this is controlled by the GPO.

    What I have found so far is my own Laptop has the same issue.  I have tried disabling the system from powering down the network device (power savings) and still lose connection.

    This also seems to happen almost exclusively when connecting to Windows2008 servers and Windows7 PCs.  

    Edit:  Oh, found this seems to be associated to specific networks.  I just tested this from another network and not a single connection loss with 3 hours of testing scenarios.  

    This seems like a combination of two points.  Since the problem doesn't occur while connecting to our Win2k3 servers, it would seem that the RDP version in Win2k8 has something different about it that causes certain networks to randomly lose connection while the connection is idle.

    My main question is how do I stop the random disconnects from happening.

     

     

     


    Tuesday, November 22, 2011 5:21 PM

Answers

  • I think that you should do that, look:

    - Most of the clients (98%) are connecting with no issues.

    - You have checked all possible configurations that could be causing it.

    - You might damage something for ALL your clients if you keep trying to solve this by changing other configurations.

    - The most common reason for a RDP connection to hang is unstable connectivity at client side.

     

    So in many ways the most logical reason for this issue is at client side.

     

    If you think this is right please give a closure to this thread.

    Thanks,

     

     

     


    goDog
    • Proposed as answer by godog_co Monday, December 12, 2011 8:50 PM
    • Marked as answer by Hotpocketdeath Monday, December 12, 2011 9:03 PM
    Monday, December 12, 2011 8:50 PM

All replies

  • Hi,

    Please change RD Keep-Alive Interval to 1 via GPO and restart the machines for the change to take effect.  I have noticed times when the keep-alives will stop being sent when an interval other than 1 is used.

    After completing the above please test by connecting to one of your servers using Remote Desktop, minimize it for 20 minutes, and verify that it is still connected when you restore the window.

    What typically occurs is a NAT device between the client and server ends the session after xx minutes of inactivity.  If RD Keep-Alives are sent at regular intervals it will normally prevent the NAT session from being terminated except in cases where there is a really low timeout setting such as two minutes.  If you want you could change the inactivity timeout setting on the devices to no timeout for port 3389 (or all ports), or make it a long value.  Many lower-end devices have a hard-coded timeout value with no ability to change it.

    Thanks.

    -TP

    Wednesday, November 23, 2011 2:46 PM
  • Sorry, but that made things worse.  Instead of disconnects every 10-20 minutes, they started occurring after only a few minutes.

    And unfortunately, I can't fix our client's networks because that is outside our support, so I would really like to get this fixed server side.

    Wednesday, November 23, 2011 10:08 PM
  • Is there nothing that can be done to correct this server side?
    Wednesday, November 30, 2011 4:37 PM
  • Hello Hotpocketdeath,

     

    Question: In that different network (where everything goes fine) are the same AD and GPOs still appliying? This behavior is typical of GPO configuration to void idle sessions from consuming RDS licenses.

     

    Also try disabling Windows TCP Autotunning, from an elevated command promt (client side):

    netsh int tcp set global autotuninglevel=disabled


     


    goDog

    Friday, December 2, 2011 7:29 PM
  • Hello Hotpocketdeath,

     

    Question: In that different network (where everything goes fine) are the same AD and GPOs still appliying? This behavior is typical of GPO configuration to void idle sessions from consuming RDS licenses.

     

    Also try disabling Windows TCP Autotunning, from an elevated command promt (client side):

    netsh int tcp set global autotuninglevel=disabled


     


    goDog

    Hi Godog,

    The other networks are just the client side networks which can be some small business or a home network, so if they do run GPO's, we don't configure them.  We have no control over the operation of these networks.  On my home network, I lose connection, but I tracked it down to the router since I can maintain RDP sessions for hours on end when the computer is hooked directly through the modem.  I've notified the router manufacturer of my findings, but have not heard back from them.  But at the same time, using the same testing accounts and testing servers, my co-worker does not have any connection interruptions from his home network or from our buisness offices.

    Currently, out of every 100 clients we have, 1 or 2 of them may experience these timeout issues on average.  We are thoroughly convinced this is a problem on their remote network that is to blame, but we would like to compensate for this as best we can without telling the customer it's their problem.

    I've also ran Wireshark to look at the network traffic.  We are seeing packets being transferred at regular intervals when Keep-Alive is enabled.  I don't think it is a firewall issue blocking the keep-alive packets because we are seeing acknowledgments.

     

    I'll try out that cmd when I am at network that I know has the issue.

    Monday, December 5, 2011 5:23 PM
  • Thanks,

     

    Please try that command on a client PC and let me know how it goes.

     


    goDog
    Monday, December 5, 2011 8:35 PM
  • Any updates here?
    goDog
    Friday, December 9, 2011 1:51 PM
  • Sorry for the delay,  

    But the command did not work.  Issue still remains.  

    I hate to do it, but it looks like I have no choice but to tell the clients they need to have someone look at their own networking configuration/equipment to fix this issue.

    Friday, December 9, 2011 2:54 PM
  • I think that you should do that, look:

    - Most of the clients (98%) are connecting with no issues.

    - You have checked all possible configurations that could be causing it.

    - You might damage something for ALL your clients if you keep trying to solve this by changing other configurations.

    - The most common reason for a RDP connection to hang is unstable connectivity at client side.

     

    So in many ways the most logical reason for this issue is at client side.

     

    If you think this is right please give a closure to this thread.

    Thanks,

     

     

     


    goDog
    • Proposed as answer by godog_co Monday, December 12, 2011 8:50 PM
    • Marked as answer by Hotpocketdeath Monday, December 12, 2011 9:03 PM
    Monday, December 12, 2011 8:50 PM
  • Monday, October 29, 2018 9:46 AM