- Set idle timeout to 5 minutes and configure sessions to disconnect rather than terminate on idle timeout
- Default load balancing
- When timeout of idle session occurs + 2 min grace time the session correctly disconnect on session host 2.
- I connect again to the host pool and the load balancer picks session host 1 (bad choice since I have a disconnected session on on session host 2.) It creates a new session on session host 2. (I can now see that I have one disconnected and one active session.) Really bad since this messes with shared user profiles.
- Waiting for a timeout on the new session and I know have one disconnected session on each session host.
- Connecting to the host pool again just to see what happens. Load balancer picks session host 1 where RDS uses the disconnected session correctly.
My 2 cents worth of root cause analysis: The load balancing algorithm that you have developed fails to consider whether I already have a disconnected session on one of the session hosts.
@Johan_Eriksson : As you mention, the expected behavior is to select the session that is disconnected which does happen in most cases. We have seen several instances like yours and are investigating. If we cannot find resolution in our other repro's, may I reach out to you through the Private Messages to nail it down?
@christianmontoya Sure, feel free to reach out via private messages. I am happy you are looking at this, since not fixing it would leave my users with a bad experience. I was even contemplating only using one (very big) session host as an ugly work around to this limitation.
@Johan_Eriksson@christianmontoya We have experienced this disconnect issue as well. We have an excel app that will lock database files when it is pulling reports. The user that was testing the app left the session open at the end of the day. The next day we could not get his user to connect to the same server with the locked files. We have a pool with 4 vms, and while he was trying to connect he actually went to all 3 of the others and never to the one with the disconnected session and running apps. We eventually had to kill the disconnected session to unlock the files.
I have the same issues. It isn't as consistent as above since I sometimes do get reconnected to my existing session but I have had it where my users end up getting load balanced to a different machine than their disconnected session.