Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I don't want my VPS to log off disconnected sessions. It's really annoying because some programs freeze then. OS is Windows Server 2008 R2.

How do I prevent disconnected sessions from being logged off?

I have tryed pepoluan, rayan ries and Simon L answers

share|improve this question
    
You've tried all of our suggestions and still your disconnected RDP sessions are being disconnected? Are you sure the server's not completely rebooting while you're away? –  Ryan Ries Oct 22 at 19:30

3 Answers 3

By default, a standalone Windows installation will not logoff disconnected RDP sessions.

So your installation must have been customized for it to be logging off disconnected RDP sessions.

Start MMC.

Load the Group Policy Object Editor snapin. It will be targeting the Local Computer.

Drill down to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Session Time Limits

Verify that the setting "Set time limit for disconnected sessions" is either Not Configured, or Enabled, but with a setting of Never.

share|improve this answer

The GPO answers work as well, i just wanted to add to the answers. This is as Ryan says, out of the ordinary, since by default your sessions can idle for as long as they want. You can however customize the disconnect time with the policy mentioned. The registry key involved with this policy, should you need to configure this on a single server is

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

Create or update a DWORD called MaxDisconnectionTime Now set the amount of time a user can be disconnected in miliseconds. EG : 1209600000 for 14 days and so on.

If you want the disconnect to be unlimited you can delete the value.

share|improve this answer

To add what @Ryan wrote, if the Local Security Policy is "Not Configured", next you must check the Terminal Services Configuration / Remote Desktop Configuration. Right-click the "Connection", choose "Properties", and check that there are no "Force Disconnect" option being enforced.

(I don't have access to a Windows Server 2008 R2 machine at the moment; I'll update/fix my answer when I regain access)

Erratum: The location is Start > Administrative Tools > Remote Desktop Services > Remote Desktop Session Host Configuration. Double-click on "RDP-Tcp", and go to the "Sessions" tab.

Edit to add: Do note, though, that without limiting sessions with forced logoffs, you will sooner or later run into the hard-coded 2 RDP sessions limitations (including 'console' sessions), necessitating a Forced Logoff after all.

share|improve this answer
    
There is "Override user settings" and all set to "Never" –  user212180 Mar 10 at 8:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.