{"id":3924,"date":"2026-11-28T15:30:00","date_gmt":"2026-11-28T15:30:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=3924"},"modified":"2026-11-28T15:30:00","modified_gmt":"2026-11-28T15:30:00","slug":"rdp-session-timeout-idle-disconnect","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/11\/28\/rdp-session-timeout-idle-disconnect\/","title":{"rendered":"RDP Session Timeout: Fix Idle Disconnects and Logoffs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">An RDP session timeout can disconnect an idle desktop, end a session after a fixed duration, or log off a disconnected user. The fix is to identify which Windows Session Time Limits policy is firing, then choose a value that fits your workload.<\/p>\n\n\n\n<aside class=\"ap-card\" aria-label=\"Buffalo Windows RDP 4 GB (Basic KVM 4)\">\n<span class=\"ap-card__badge\">Practical choice<\/span>\n<div class=\"ap-card__body\"><p class=\"ap-card__name\">Buffalo Windows RDP 4 GB (Basic KVM 4)<\/p><p class=\"ap-card__best\">Best for one browser profile, MT4\/MT5 EA, rater work, Google Ads account<\/p><ul class=\"ap-card__features\"><li>3 vCPU Intel Xeon E5-2699 v4, 4 GB reserved RAM<\/li><li>60 GB SSD (RAID 1), 3 TB traffic on a 200 Mbps port<\/li><li>Full Administrator, private KVM VM, 1 dedicated US IPv4<\/li><li>Windows Server 2019, Windows 10 Pro or Windows 11 Pro image; bring your own licence<\/li><li>Browser console, reinstall, reboot from the client area<\/li><li>Pay by crypto (Cryptomus), UPI\/card (Razorpay, Cashfree) or card (Paddle)<\/li><\/ul><\/div>\n<div class=\"ap-card__side\"><p class=\"ap-card__price\">$9.99\/mo <small>USD monthly<\/small><\/p><a class=\"ap-card__btn\" href=\"https:\/\/vpslake.com\/buy-windows-rdp\">Order now \u2192<\/a><\/div>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">What you need before changing an RDP session timeout<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You need an administrator account, permission to edit local or domain Group Policy, and the approximate time and message shown when the session drops. Note whether you were using the desktop, had closed the RDP client, or left a bot or EA running without input.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the server belongs to a domain, its policy can overwrite a local change. Record the current settings, and export the relevant registry key before editing it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Idle, active, and disconnected limits explained<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Windows treats these as different session states. That distinction matters because a trading EA or automation process can be working while the desktop itself has received no human input.<\/p>\n\n\n\n<figure class=\"wp-block-table ap-table\"><table><thead><tr><th>Setting<\/th><th>What it measures<\/th><th>What normally happens when it expires<\/th><\/tr><\/thead><tbody><tr><td>Set time limit for active but idle Remote Desktop Services sessions<\/td><td>Time since the session received keyboard or mouse input<\/td><td>The active session is disconnected; Windows normally warns two minutes before the disconnect<\/td><\/tr><tr><td>Set time limit for active Remote Desktop Services sessions<\/td><td>Total time since the session was connected<\/td><td>The active session is disconnected after the selected duration, even if you are working<\/td><\/tr><tr><td>Set time limit for disconnected sessions<\/td><td>Time since you closed the RDP client or lost the connection<\/td><td>The disconnected session is removed after the limit, which ends its running programs<\/td><\/tr><tr><td>End session when time limits are reached<\/td><td>What Windows does after an active or idle limit<\/td><td>A timed-out session is logged off instead of merely disconnected<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When these policies are not configured, Microsoft documents the three limits as unlimited at the Group Policy level. A disconnected session can remain with its programs running until another setting removes it. See the <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/client-management\/mdm\/policy-csp-admx-terminalserver\" target=\"_blank\" rel=\"noopener\">Microsoft policy reference<\/a> for defaults and precedence.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An RDP client dropping because of Wi-Fi or another network event is different: the server may keep the session active. A policy timeout usually repeats at a predictable interval and produces a timeout message.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Open the Session Time Limits policies<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The goal is to see every policy that can disconnect or end your session before changing one setting.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Press <code>Win + R<\/code>, type <code>gpedit.msc<\/code>, and press Enter. On a domain-managed server, open the relevant Group Policy Object in <code>gpmc.msc<\/code> instead.<\/li>\n\n\n<li>Go to <strong>Computer Configuration &gt; Administrative Templates &gt; Windows Components &gt; Remote Desktop Services &gt; Remote Desktop Session Host &gt; Session Time Limits<\/strong>.<\/li>\n\n\n<li>Inspect <strong>Set time limit for active but idle Remote Desktop Services sessions<\/strong>, <strong>Set time limit for active Remote Desktop Services sessions<\/strong>, <strong>Set time limit for disconnected sessions<\/strong>, and <strong>End session when time limits are reached<\/strong>.<\/li>\n\n\n<li>Check both Computer Configuration and User Configuration if the local editor or domain policy exposes both. Computer policy takes precedence when both are configured.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Success is a record of each setting\u2019s state and duration. A blank local setting does not rule out a domain or RDS collection policy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Set the limit that matches the symptom<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Choose the policy from the state you observed so you do not disable a useful control when the problem is a dropped connection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The desktop disconnects after you stop moving the mouse<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open <strong>Set time limit for active but idle Remote Desktop Services sessions<\/strong>, select <strong>Disabled<\/strong> or set the idle limit to <strong>Never<\/strong>, and apply the change. If you need an inactivity control, use a longer value. Microsoft says an enabled policy warns two minutes before disconnecting an idle session.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The desktop disconnects after the same total duration every time<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open <strong>Set time limit for active Remote Desktop Services sessions<\/strong>. Set it to <strong>Never<\/strong> or choose a duration longer than the longest planned work period. It counts total connected time, not just time without input.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Programs stop after you close the RDP window<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Closing the RDP client normally leaves the Windows session disconnected. Set <strong>Set time limit for disconnected sessions<\/strong> to <strong>Never<\/strong> when it must remain available; otherwise choose a retention period longer than your longest gap between logins.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The message says the session ended or the desktop is gone<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check <strong>End session when time limits are reached<\/strong>. When enabled, Windows logs off a session that reaches its active or idle limit. Set it to <strong>Disabled<\/strong> or <strong>Not configured<\/strong> if reconnection is the goal.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Safe values for bots and EAs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An RDP idle timer measures user input, not whether a program is busy. A bot or MT4\/MT5 EA can be working while Windows considers the session idle. For a single-user private RDP, use this starting point:<\/p>\n\n\n\n<figure class=\"wp-block-table ap-table\"><table><thead><tr><th>Workload<\/th><th>Idle limit<\/th><th>Active limit<\/th><th>Disconnected limit<\/th><th>End session<\/th><\/tr><\/thead><tbody><tr><td>Bot or EA that must keep its desktop session<\/td><td>Never<\/td><td>Never<\/td><td>Never<\/td><td>Disabled or Not configured<\/td><\/tr><tr><td>Occasional administration<\/td><td>30\u201360 minutes, if required<\/td><td>Never<\/td><td>A period longer than your normal gap<\/td><td>Disabled or Not configured<\/td><\/tr><tr><td>Multiple users on a managed server<\/td><td>Follow the organization\u2019s policy<\/td><td>Follow the organization\u2019s policy<\/td><td>Follow the organization\u2019s policy<\/td><td>Follow the organization\u2019s policy<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cNever\u201d removes that Group Policy limit; it does not make the network permanent or override another administrator policy. If your organization requires idle logoff, follow that rule and document any separate automation account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Cross-check the registry values<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Group Policy is the safer place to make the change, but the registry can explain a confusing result. Policy-backed values are commonly under:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal Services\nHKEY_CURRENT_USER\\Software\\Policies\\Microsoft\\Windows NT\\Terminal Services<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The important value names are:<\/p>\n\n\n\n<figure class=\"wp-block-table ap-table\"><table><thead><tr><th>Registry value<\/th><th>Meaning<\/th><th>Unit<\/th><\/tr><\/thead><tbody><tr><td><code>MaxIdleTime<\/code><\/td><td>Maximum time with no keyboard or mouse input<\/td><td>Milliseconds<\/td><\/tr><tr><td><code>MaxConnectionTime<\/code><\/td><td>Maximum total connected time<\/td><td>Milliseconds<\/td><\/tr><tr><td><code>MaxDisconnectionTime<\/code><\/td><td>Maximum time a disconnected session remains active<\/td><td>Milliseconds<\/td><\/tr><tr><td><code>fResetBroken<\/code><\/td><td>Whether a timed-out session is ended instead of disconnected<\/td><td>Policy flag<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Computer policy is under <code>HKEY_LOCAL_MACHINE<\/code>, user policy under <code>HKEY_CURRENT_USER<\/code>, and policy values take precedence. For the first two timers, Microsoft documents <code>REG_DWORD<\/code> value <code>0<\/code> as unlimited. Do not overwrite a domain-managed value by hand.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To see which policy is actually applied, open an elevated Command Prompt and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gpresult \/h \"%USERPROFILE%\\Desktop\\gp-result.html\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open the report and search for <strong>Session Time Limits<\/strong>. If it shows a domain setting, change that policy at its source. After a registry test, run <code>gpupdate \/force<\/code>, reconnect, and confirm the result.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Apply and verify the change<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Verification proves the session state changed after the policy refresh.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>In an elevated Command Prompt, run <code>gpupdate \/force<\/code> and wait for it to finish.<\/li>\n\n\n<li>Save open work, close the RDP client, and reconnect. Microsoft says reconnecting or logging off and on may be required.<\/li>\n\n\n<li>Run <code>qwinsta<\/code> to view the session state. Your session should show as active while connected and disconnected after the client closes, not logged off immediately.<\/li>\n\n\n<li>For an idle-limit test, leave the session untouched longer than the configured value. If the limit is enabled, look for the warning before the disconnect.<\/li>\n\n\n<li>For a disconnected-limit test, close the client and reconnect before the retention period ends. Confirm that the same desktop and running program are present.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If a test fails, record the message, elapsed time, <code>qwinsta<\/code> state, and applied policy from <code>gpresult<\/code>. Those details usually identify the responsible limit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ending versus disconnecting a session<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Disconnecting keeps the session and its programs on the server for reconnection. Signing out or ending the session closes programs and removes the interactive session.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is why clicking the RDP window\u2019s close button is not the same as choosing <strong>Sign out<\/strong> inside Windows. For a longer explanation of preserving work after closing the client, see <a href=\"https:\/\/vpslake.com\/blog\/2026\/10\/30\/keep-programs-running-after-closing-rdp\/\">Keep Programs Running After Closing RDP<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the session is logged off despite correct limits, check <strong>End session when time limits are reached<\/strong>, user-session settings, scheduled maintenance, and RDS collection settings. A short disconnected limit can make a network drop look like a logoff.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When the problem is the network instead<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Policy timeouts are predictable. Network disconnects are more likely when the window drops while you type, timing changes, or there is no timeout warning.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the client network, VPN, Wi-Fi, firewall path, and server resources. If the server uses the default listener, test the port from Windows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Test-NetConnection -ComputerName YOUR_SERVER_IP -Port 3389<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A successful port test does not prove the full session is healthy, but a failed test points to connectivity or filtering. For a slow desktop, use the <a href=\"https:\/\/vpslake.com\/blog\/2026\/11\/03\/remote-desktop-slow-fix\/\">Remote Desktop slow or laggy troubleshooting checklist<\/a>. For clipboard problems, see <a href=\"https:\/\/vpslake.com\/blog\/2026\/10\/13\/fix-copy-paste-not-working-rdp\/\">How to Fix Copy-Paste Not Working in RDP<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Microsoft guide on <a href=\"https:\/\/learn.microsoft.com\/en-us\/troubleshoot\/windows-server\/remote\/troubleshoot-unexpected-rds-session-locks-or-disconnections\" target=\"_blank\" rel=\"noopener\">unexpected RDS session locks or disconnections<\/a> separates policy timeouts from locks and network behavior. Use the message and timing first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting checklist<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Same delay every time: inspect <code>MaxIdleTime<\/code>, <code>MaxConnectionTime<\/code>, and the matching Group Policy setting.<\/li>\n\n\n<li>Disconnect after closing the client: inspect <code>MaxDisconnectionTime<\/code> and whether the session is immediately ended.<\/li>\n\n\n<li>Logoff instead of reconnectable disconnect: inspect <code>fResetBroken<\/code> and <strong>End session when time limits are reached<\/strong>.<\/li>\n\n\n<li>Settings keep reverting: check domain policy and the <code>gpresult<\/code> report.<\/li>\n\n\n<li>No predictable timing and no warning: investigate the client or network path.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">What is the default RDP idle timeout?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When the active-but-idle policy is not configured, Microsoft documents no Group Policy time limit, so the session can remain idle indefinitely. A domain or security setting can still affect it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I stop RDP from disconnecting when idle?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Set <strong>Set time limit for active but idle Remote Desktop Services sessions<\/strong> to <strong>Disabled<\/strong> or <strong>Never<\/strong>. Run <code>gpupdate \/force<\/code>, reconnect, and check for a domain override.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does closing RDP stop a running bot or EA?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Closing the client normally disconnects rather than signs you out. A bot or EA can continue until the disconnected-session or end-session policy removes it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does RDP disconnect at random times?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Random drops without a repeatable interval are more consistent with network or client problems. Check the message and connection path before changing time limits.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is the difference between RDP disconnect and logoff?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A disconnect leaves the session available for reconnection. A logoff closes its programs, so an end action can cause loss of unsaved work.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"What is the default RDP idle timeout?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"When the active-but-idle policy is not configured, Microsoft documents no Group Policy time limit, so the session can remain idle indefinitely. A domain or security setting can still affect it.\"}}, {\"@type\": \"Question\", \"name\": \"How do I stop RDP from disconnecting when idle?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Set Set time limit for active but idle Remote Desktop Services sessions to Disabled or Never. Run gpupdate \/force, reconnect, and check for a domain override.\"}}, {\"@type\": \"Question\", \"name\": \"Does closing RDP stop a running bot or EA?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Closing the client normally disconnects rather than signs you out. A bot or EA can continue until the disconnected-session or end-session policy removes it.\"}}, {\"@type\": \"Question\", \"name\": \"Why does RDP disconnect at random times?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Random drops without a repeatable interval are more consistent with network or client problems. Check the message and connection path before changing time limits.\"}}, {\"@type\": \"Question\", \"name\": \"What is the difference between RDP disconnect and logoff?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"A disconnect leaves the session available for reconnection. A logoff closes its programs, so an end action can cause loss of unsaved work. DONE rdp-session-time-limit-idle-timeout words=1796\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Learn how to fix an RDP session timeout, set safe idle and disconnected limits, and tell a Group Policy logoff from a network drop for long jobs.","protected":false},"author":1,"featured_media":3925,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[10],"tags":[32,23,58,42],"class_list":["post-3924","post","type-post","status-publish","format-standard","has-post-thumbnail","category-windows-rdp","tag-rdp","tag-remote-desktop","tag-troubleshooting","tag-windows-server","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/3924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=3924"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/3924\/revisions"}],"predecessor-version":[{"id":4253,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/3924\/revisions\/4253"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/3925"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=3924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=3924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=3924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}