What causes "hung sessions" in RDP/Terminal Services??

psaechaopsaechao Member Posts: 29 ■■■□□□□□□□
The company I currently work for hosts application servers for other companies. Users connect to our servers through Remote Desktop Protocol (RDP), which gives them access to a full range of applications like Microsoft Office, various web browsers, specific applications, and even a File Explorer to save documents onto our servers. This provides users with a complete online workspace without having to install anything. Users can access this on any computer with an active Internet connection.


That being said, there are some issues with RDP and terminal services. Every now and then, more often than we'd like, users will become "stuck" on the server - we call it a "hung session". Users will call in saying that they are trying to log onto the server (via RDP), but they will be stuck at the loading screen. Ending the RDP process on their local machine does nothing because it only closes the session on their local machine - the server still shows that they're logged in. If they try to log back into RDP, they will be brought back to the loading screen.


I've been told that this can happen for many reasons like trying to log into RDP on two different computers, locking your machine, the session timing out after a period of non-activity, etc. When this happens, we normally have to force log them off the server via Terminal Services Manager. Many times Terminal Services Manager looks fine - sometimes it shows that the user is "disconnected".


Does anyone have a good explanation for "hung sessions"?
DeVry B.S Network and Communications Management: Completed
CCENT: Completed
CCNA R/S: 2019

Comments

  • scaredoftestsscaredoftests Mod Posts: 2,780 Mod
    Have the users ever been able to log on to the servers? Do they log out successfully if they do? What rights do they have to the servers?
    Never let your fear decide your fate....
  • psaechaopsaechao Member Posts: 29 ■■■□□□□□□□
    We have several servers that the users log into, which are load balanced. During peak hours, there are maybe 40-50 users logged on per server. We have a custom interface that they see when they log in - users do not see the actual desktop, only a toolbar with specific icons to applications that we give them. Their rights and access are only limited to those applications. They don't have privileges to the Task Manager so only admins can kick them off via Terminal Services.
    DeVry B.S Network and Communications Management: Completed
    CCENT: Completed
    CCNA R/S: 2019
  • gespensterngespenstern Member Posts: 1,243 ■■■■■■■■□□
    I used to build and manage a pure RDP cluster (i.e. without citrix) on 2008R2 and on 2003R2 before that and didn't have this problem => tech itself can work okay, most likely it is you config that has something odd in it. Do you use TS session broker?

    Why don't you analyze eventlogs on a server and look for possible errors?

    Do you use a policy to terminate disconnected and idle sessions say in an hour or two?

    What exactly user sees on a hung session? I assume "loading user's profile" or what? A screenshot maybe?

    Have you analyzed what processes were already spawned during a session creation to see what process could be causing this? For example using process explorer or procmon?

    Do you have any suspicious logon scripts that may do something that could hang during logon process? Have you tried to get rid of your logon scripts temporarily for a group of users and see if it fixes the problem?

    Could it be related to persistent mapped drives to defunct storage locations? Sometimes they cause extremely slow (like 30 minutes or so) logons that could be confused with totally hanging.
Sign In or Register to comment.