Since bug 5476 users now have the option of abandoning a session that it is no longer possible to reconnect to. This allows the users to create new sessions and continue their work.
This situation generally occurs in two scenarios:
* The agent machine has gone offline (planned or otherwise)
* The agent is temporarily unreachable, e.g. because of network issues or being overloaded
In the first scenario abandoning the session is the correct decision as the session is indeed gone.
However in the second scenario the session is still alive, with all the processes that entails. Those will continue to consume resources, and could interfere with new sessions created as well.
Once the session is abandoned the user has no way of reaching that session again. The user (or admin) will have to log in some other way on the agent and kill that session manually.
There is no obvious fix here. A session is marked unreachable since we cannot contact vsmagent. That also means we cannot kill the session as we need vsmagent for that.
One idea is to hope the agent comes back eventually and kill the session then. That would mean keeping track of all abandoned sessions and periodically check if they are reachable again.
The major problem with that is if the agent never comes back. We don't want to keep track of things forever. A timeout would solve that but the question is how long it should be.
We could also give admins the option of not ending up in this situation by not allowing sessions to be abandoned. Users would then have to wait until the issue with the agent is resolved. However that won't work if the agent never comes back.
Admins can mitigate the issue by using "-MaxDisconnectionTime" to clear out sessions that haven't been connected for some time.
One way to improve the life for the admins is to let them have some way of knowing which sessions has been left abandoned and is cluttering their systems.
Either perhaps have this information logged:
"UserA abandoned session <PID> on agentB"
Or some other way that let the admin programmatically get/parse this information for housekeeping their systems.