Disconnected Sessions - Login VSI Support Perspective
This blog post will talk about disconnected sessions. Disconnected sessions can be a real annoyance during a Login VSI test as they can be hard to diagnose and even harder to solve. I hope to give you a better understanding of what is causing disconnected sessions so that you can begin to avoid them and continue with a successful Login VSI test.
What are disconnected sessions?
Disconnected sessions are user sessions that are no longer connected to an end point. For example, an RDP session where the RDP client has been closed. The session stays active on the server but in a disconnected state. This disconnected state will keep applications active but it has a few consequences for the user interface.
Why are disconnected sessions a problem?
A few things happen when a session is disconnected:
- The display driver is disconnected. This results in the screen going black.
- The keyboard input is disconnected. This means that there is no longer a so-called focus.
- The mouse input is disconnected.
Number 2 above is especially a problem for running Login VSI tests. The focus is the current application that receives the keyboard and mouse input. This is also the application that is in the foreground. Login VSI uses this extensively to interact with applications. Login VSI also uses focus to force applications to the foreground to be able to switch between applications. Once a session becomes disconnected, Login VSI will no longer be able to switch between applications. This means that even after a session gets disconnected, the workload might be able to go on for a bit but it will get stuck eventually.
From a debugging point of view, the easiest way to diagnose this problem is to look at the debugging screenshots that Login VSI takes when it runs into a problem. A screenshot taken while the session is in a disconnected state will show a completely black screen.
An example of debug screenshot for disconnected sessions
A trickier scenario to troubleshoot is when the session becomes disconnected intermittently. This might cause the workload to get stuck somewhere. But before that the workload action times out, the session gets reconnected again. Reconnecting is fairly common for most of the remoting clients in use. The workload got stuck because of a disconnected session but there is no black screenshot. A common way to diagnose this as a stuck session is to check whether the session was interacting with the wrong application. This might happen because switching applications is no longer possible. In these cases, Login VSI Support can help you. Login VSI Support uses a small tool that monitors the SessionSwitch event. The SessionSwitch event will trigger once the currently active session is switched and details the reasons why.
What causes disconnected sessions?
Common causes for disconnected sessions are:
- Running too many sessions per launcher. The recommendation of 25 sessions per launcher (50 for RDP) was set to prevent remoting clients from crashing. Once a remoting client crashes, the remote session will go into a disconnected state.
- Network connectivity issues. Losing the network connection will disconnect a session. If the network issues are intermittent then the session might reconnect.
- Screen lock or screensaver policies. Some environments will lock or trigger the screensaver after a certain time. In some environments, the system sees the Login VSI uses as inactive, even though the virtual users are interacting with applications. Once the screen is locked or the screensaver kicks in, the user session is effectively disconnected. Windows will show the lock screen or the screensaver on a separate so-called window station. The user session will be disconnected.
An example of a session in a disconnected state
Disconnected session can cause hard to troubleshoot stuck session. With a few precautions a lot of these disconnected sessions can be prevented though. But as always, feel free to reach out to the Login VSI support department if you are running into issues.
Ps. this blog might be interesting to you as well: Help... my Login VSI sessions aren’t doing anything