Idle timer expired windows 10

Когда пользователь со своего компьютера закрывает окно своей RDP/RDS сессии в терминальном клиенте (mstsc.exe, RDCMan или RDP HTML WEB клиенте) простым нажатием по крестику в окне, без выполнения выхода (logoff), его сессия переходит из активного режима в режим disconnected (разъединённый сеанс). В этом режиме все запущенные пользователем программы, открытые документы и окна продолжают работать на удаленном сервере и потреблять ресурсы.

Содержание:

  • Автоматическое завершение неактивных RDP сессий в Windows
  • Сообщения о превышении длительности RDP сессий

По-умолчанию RDP сессия пользователя в Windows может находится в состоянии disconnected до перезагрузки компьютера или явного ее завершения пользователем или администратором. Это довольно удобно, т.к. пользователь может в любой момент подключиться к своей старой сессии и продолжить работу с запущенными программами и открытыми документами.

На следующем скриншоте видно, что отключенные сессии пользователей на RDS сервере с Windows Server 2019 потребляют около 35% памяти сервера.

disconnected сесии не отключаются на rds/rdp сервере

Кроме того незавершенные сессии могут блокировать открытые файлы на файловых серверах, вызывать проблемы с корректным сохранением данных в приложениях, профилях или User Profile Disks. Кроме наличие старых RDP сессий часто вызывает проблему блокировки учетной записи пользователей в домене после смены пароля (когда RDS сессии продолжает работать под старыми паролем пользователя).

С помощью команды
quser
можно узнать, когда начата RDP сессия пользователя, длительность простоя и статус сессии.

quser - длительность rdp сеансов, простоя rdp сессий

Также вы можете вывести информацию о длительности сессий пользователей в RDS фермы с помощью PowerShell скрипта (укажите FQDN вашего сервера RDS Connection Broker):

$connectionBrocker = “MSK-RDSMAN.WINITPRO.RU"
Get-RDUserSession -ConnectionBroker $connectionBrocker |select-object -Property CollectionName, HostServer, DomainName, UserName, ServerIPAddress, CreateTime, DisconnectTime,  SessionState, IdleTime , SessionID , `
@{Name='SessionAge ([days.]hours:minutes)';Expression={ ((get-date ) - $_.CreateTime) } }

Вы можете настроить максимальную длительность активных, отключенных и простаивающих (без активности пользователя) сессии для Remote Desktop Services.

Автоматическое завершение неактивных RDP сессий в Windows

Для автоматического завершения отключенных RDP/RDS сессий через определенный промежуток времени, вам нужно правильно настроить лимиты (таймауты).

Если у вас развернута полноценная Remote Desktop Services ферма на Windows Server, вы можете настроить параметры таймаутов сессий пользователей в настройках RDS коллекций на вкладке Session.

Укажите время, через которое нужно завершить отключенный сеанс в параметре End a disconnected session (по умолчанию длительность RDP сеанса не ограничена – Never). Также вы можете выставить максимальную длительность активной RDP сессии (Active session limit) и отключение бездействующего сеанса (Idle session limit). Это жесткие таймауты применяются для всех сессий в RDS коллекции.

настройка таймаутов сесий и параметров переподключения на rd session host

В Windows Server 2012 R2/2016/2019/22 можно настроить таймауты RDP сессий с помощью групповых политик. Можно использовать как редактор доменных GPO gpmc.msc, так и редактор локальных групповых политик (gpedit.msc) на конкретном RDS сервере ( или на десктопной версии Windows, если вы разрешили к ней множественные RDP подключения).

Параметры таймаутов RDP сессий находятся в разделе GPO Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Session Time Limits (Конфигурация компьютера -> Политики -> Административные шаблоны -> Компоненты Windows -> Службы удаленных рабочих столов -> Узел сеансов удаленных рабочих столов -> Ограничение сеансов по времени). Доступны следующие политики таймаутов:

  • Set time limit for disconnected session (Задать ограничение по времени для отключенных сеансов);
  • Set time limit for active but idle Remote Desktop Services sessions (Задать ограничение времени для активных, но бездействующих сеансов служб удаленных рабочих столов) – политика позволяет завершить простаивающие RDP сессии, в которых отсутствует ввод со стороны пользователя (движение мышкой, ввод символов с клавиатуры);
  • Set time limit for active Remote Desktop Services sessions (Задать ограничение по времени для активных сеансов служб удаленных рабочих столов) – максимальный срок для любой (даже активной) RDP сессии пользователя, после которого она переводится в состояние disconnected;
  • End Session when time limits are reached (Завершать сеанс при достижении ограничения по времени) – через какое время нужно завершать RDS сессию (logoff) вместо перевода ее в disconnected;
  • Set time limit for logoff of RemoteApp sessions (Задать предел для выхода из сеансов RemoteApp).

политики ограничения времени rdp сеансов по времени

По умолчанию эти параметры не настроены. Чтобы автоматически завершать отключенные RDP сеансы пользователей через 8 часов, включите политику “Set time limit for disconnected session” = Enabled, и в выпадающем списке выберите 8 часов.

политика Set time limit for disconnected session

Сохраните изменения и обновите настройки групповых политик в Windows (gpupdate /force). Новые настройки таймаутов будут применяться только к новым RDP сеансам, текущие сеансы придется завершить вручную.

Настройки GPO имеют более высокий приоритет, чем настройки таймаутов в коллекции RDS.

Аналогичные настройки по управлению таймаутами RDP есть в секции GPO с настройками пользователя: User Configuration -> Administrative Templates -> Windows Components. С помощью политики из пользовательской секции вы сможете более гибко настроить группы пользователей с различными лимитами на длительность RDP сессий.

Параметры таймаутов для RDP сессий, которые задаются политиками можно также настроить напрямую через реестр. Указанным выше политикам соответствую следующие DWORD параметры в ветке реестра HKLMACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

  • MaxDisconnectionTime
  • MaxIdleTime
  • MaxConnectionTime
  • MaxDisconnectionTime
  • RemoteAppLogoffTimeLimit

Например, чтобы установить максимальную продолжительность для отключенной RDP сессии в 15 минут (90000 мс), нужно изменить параметр реестра с помощью такой команды PowerShell:

Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name MaxDisconnectionTime -Type 'DWord' -Value 900000

Также вы можно можете задать ограничение времени RDP сессии на вкладе sessions в свойствах локального (консоль lusrmgr.msc) или доменного пользователя (консоль dsa.msc — ADUC). Здесь доступны следующие параметры:

  • End a disconnected session
  • Active session limit
  • Idle session limit
  • When a session limit is reached or connection is broken: Disconnect from session или End Session
  • Allow reconnection: From any Client или From originating client only

настройки макс. длительности сессий в свойствах пользователя

Не стоит делать таймауты на время RDP сеанса слишком маленькими, иначе сеансы пользователей будут завершаться при малейшей неактивности.

Если у вас развернут RD Gateway Server для доступа к RDS серверам, вы можете настроить отдельные таймауты для пользователей, подключенных через RDGW (откройте политику авторизации подключений и перейдите на вкладку Timeouts).

В Windows Server 2008 R2 также можно было задать лимиты RDP сессий на хосте через специальную консоль tsconfig.msc (RD Session Host Configuration). Достаточно было запустить консоль, щелкнуть правой кнопкой по RDP-Tcp -> Properties. Настройки ограничения длительности сессий находятся на вкладке Sessions. Но в следующих версиях Windows Server эта консоль отсутствует (хотя вы можете вручную скопировать файлы tsadmin.msc и tsconfig.msc и использовать эти консоли и более новых версиях Windows Server).

лимиты rdp в консоли tsconfig.msc

Сообщения о превышении длительности RDP сессий

После того, как вы настроили политики с таймаутами RDS, пользователи увидит такое сообщение, перед завершением своей сессии:

Idle timer expired
Session has been idle over its time limit.
It will be disconnected in 2 minutes.
Press any key to continue the session.

сообщение о простаивающей сесии в windows через 2 минуты

При этом в логах хоста появляется Event ID 26.

Подробнее о логах RDP подключений. [/aler]

событие простаивающей rdp сессии

Вы можете отключить это предупреждение, установив в классе WMI Win32_TSSessionSettings значение EnableTimeoutWarning = 0.

Set-WmiInstance -Path "\\localhost\root\CIMV2\TerminalServices:Win32_TSSessionSetting.TerminalName='RDP-Tcp'" -Argument @{EnableTimeoutWarning=0}

Теперь, когда Windows будет автоматически завершать простаивающие RDP сеансы, пользователь получит от RDP клиента такое сообщение:

Your Remote Desktop Services session ended because the remote computer didn’t receive any input from you.

rds сессия завершена из-за неактивности пользователя

В некоторых случаях вы можете столкнуться с такой ошибкой в RDP клиенте:

Your Remote Desktop Services session has ended.
Another user connected to the remote computer, so your connection was lost. Try connecting again, or contact your network administrator.

rds сессий завершена другим пользователем

Это означает, что кто-то другой вошел на компьютер через RDP (когда количество одновременных RDP сессий на компьютере ограничено параметром Limit number of connections, например, в десктопных версиях Windows доступен только один сеанс). Либо вы повторно вошли на удаленных RDP/RDS хост с нового компьютера.

Вы можете разрешить множественные подключения под одним пользователем к RDP хосту с помощью параметра GPO Restrict Remote Desktop Services users to a single Remote Desktop Services session = Disabled (в ветке разделе Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections).

групповая политика - ограничить количесвто сессий для одного пользователя до одной

Remote desktop connections have become a part of your essentials since they allow you to quickly connect to your devices from anywhere. However, what happens when you encounter the «Idle timer expired» error message?  

In this article, we will show you what to do when «Idle timer expired» keeps popping up and how to prevent it from happening again in the future.

idle time expired

  • Part 1: What Does «Idle Time Expired» Mean?
  • Part 2: Causes of the «Idle Timer Expired» Error
  • Part 3: How to Fix «Idle Timer Expired»
  • Part 4: Preventive Measures for «Idle Timer Expired» Error
  • Part 5: A Safe and Stable Remote Desktop Solution for Personal and Business

Part 1. What Does «Idle Time Expired» Mean?

Firstly, you need to understand what the «Idle Timer Expired» error means. In essence, this message is a timeout notification that appears when a session has been inactive for a certain period. Therefore, it indicates that your session has been idle for too long, causing the remote desktop server to terminate the connection.

Some of the most common scenarios when the «Idle timer expired» keeps popping up are:

  • Inactivity During a Session: If you haven’t been actively using the remote desktop for a certain time, the server assumes that you are not still working on this environment. Therefore, it closes the connection to use the resources elsewhere.
  • Timeout Settings: If you are using a remote desktop in an organizational environment, then the Group Policy settings might impose a timeout limit. This happens to save resources and optimize the server’s performance.
  • Poor Network Stability: A weak or unstable network connection can lead to disruptions in your remote sessions, including the «Idle timer expired» error.

Part 2. Causes of the «Idle Timer Expired» Error

If you are trying to learn how to disable «Idle timer expired» Windows 10, you must first identify its causes. In more detail, the most common ones are the following:

  • Default Timeout Settings: In most cases, this message will appear when the session reaches the default timeout limit. Most remote desktop tools have a pre-configured idle timeout limit. If you’re not aware of it, you might find that the “Idle timer expired” keeps popping up.
  • Network Issues: Your Internet connection greatly affects the quality of your remote sessions. Therefore, an unstable or slow connection can lead to many issues, such as this particular one.
  • Session Configuration Errors: In some cases, incorrect settings might trigger the cause for a session timeout.
  • Security Policies: In big organizations, security policies or firewalls might enforce strict timeouts to limit the duration of remote sessions.

Part 3. How to Fix «Idle Timer Expired»

Now that you understand the causes, you can start learning how to disable «Idle timer expired» on Windows 10. In this section, we show you step-by-step guides for the most effective methods to troubleshoot it.

Method 1: Adjust Remote Desktop Timeout Settings

  1. Step 1.Press Win + R, type gpedit.msc, and hit Enter to open the Group Policy Editor.
  2. Step 2.Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits.
  3. Step 3.Locate the policy Set time limit for active but idle Remote Desktop Services sessions. Double-click on it and select the Enabled option and set Idle session limit to Never.
  4. Step 4.Locate the policy Set time limit for disconnected sessions. Double-click on it, select Enabled, and set End a disconnected session to Never.
  5. Step 5.Locate the policy Set time limit for active Remote Desktop Services session and double-click on it. Select the Enabled option and set Active session limit to Never.

Method 2: Modify Remote Desktop Client Settings

  1. Step 1.Open Remote Desktop Connection on your computer.
  2. Remote Desktop Connection

  3. Step 2.Click Show Options and go to the Experience tab.
  4. remote desktop connection experiences tab

  5. Step 3.Check the Reconnect if connection is dropped option. Furthermore, set the connection speed to match your internet connection quality.
  6. reconnect if connection is dropped

Part 4. Preventive Measures for «Idle Timer Expired» Error

Even though the above methods are effective, it is important to also know how to prevent the «Idle timer expired» error from happening again. The best ways to do that are the following:

  • Automated Reconnection Tools: There are tools available that can automatically reconnect you to the remote desktop session if the connection is lost. This way, you can rest assured that you won’t experience any disruptions from timeout limits.
  • Session Keep-Alive Settings: Another thing that you can do is to change the settings to keep the session alive by sending periodic signals to the server. By doing this, you are preventing the timeout from occurring since you signal that you are still active on the session.
  • Regular Monitoring of Idle Time: The best way to prevent the “Idle timer expired” error is to monitor your activity. This way, you can take proactive measures to avoid long idle periods.

Part 5. A Safe and Stable Remote Desktop Solution for Personal and Business

One way to ensure an uninterrupted remote desktop experience is by getting a tool that understands your needs. AirDroid Remote Support is a reliable alternative that offers a secure and stable solution for both personal and business remote desktop needs. With this tool, you can perform your tasks and optimize your processes without having to worry about your session timeout limits or other interruptions.

AirDroid Remote Support

Some other key features of AirDroid Remote Support include:

  1. Real-time Screen Sharing: AirDroid makes remote assistance as easy as it can possibly be by allowing you to share screens in real time. This way, you can see what the other user is experiencing to provide more thorough assistance.
  2. Remote Control: Not only you can take full control of the remote device with a controllable clipboard and keyboard, but you can also set it up as attended or unattended. In the second case, you don’t need a user on the other end.
  3. File Transfer: AirDroid allows secure file transfers between devices through its built-in chat interface.
  4. Cross-Platform Support: Use AirDroid Remote Support on Windows, macOS, Android, or iOS.

Steps to Use AirDroid Remote Support

  1. Step 1.Download AirDroid Remote Support and AirDroid Business from official website. The first is for your remote devices and the second is for your local computer. Get all the installers for free.
  2. Step 2.On the remote device, launch AirDroid Remote Support and find its ID, which is a 9-digit code. It will be under the Connect with ID section.
  3. AirDroid Remote Support Connection ID

  4. Step 3.On the local device, open AirDroid Business. Type the 9-digit code from AirDroid Remote Support and click the Connect button.
  5. choose id connect

Wrapping Up

If the «Idle timer expired» keeps popping up, you might feel frustrated as it can put a stop to your work. However, understanding its causes can help you troubleshoot it in a few, simple steps. If you want a reliable and stable alternative though, there is no better option than AirDroid Remote Support. Its rich features and ease of use make it an excellent choice for anything you might want to accomplish. Try AirDroid Remote Support today to discover its capabilities!

Session Has Been Idle Over its Time Limit Idle Timer Expired Windows

You may receive the Idle Timer Expired message in Citrix or Windows while working on your desktop.

Idle timer expired

Sessions has been idle over its time limit.

It will be disconnected in 2 minutes.

Press any key now to continue session.

You must specify and increase a timeout reconnection for a remote session. Follow the steps below. These steps must be performed by your systems administrator.

  1. On the RD Session Host server, go to Remote Desktop Session Host Configuration -> Remote Desktop Session Host Configuration -> Start -> Administrative Tools -> Remote Desktop Services -> Remote Desktop Session Host Configuration.
  1. Under Connections right-click the name of the connection, and choose Properties.
  1. In the Properties of the connection choose Sessions and select the following options as necessary:

*Select the Override user settings check box, and then set timeout settings for End a disconnected session, Active session limit, and Idle session limit.

*Select the Override user settings check box, and then select one of the following reconnection settings: Disconnect from session or End session.

  1. Click OK. Changes to timeout and reconnection settings are not applied to sessions that are connected when the change is made.

* Please use the comment form below. Comments are moderated.*

When a user closes the RDP/RDS session window in a terminal client (mstsc.exe, RDCMan or Remote Desktop HTML5 web client) by simply clicking the cross in the top right corner without logging off, his session goes from active to a disconnected mode. In this mode, all apps, open documents, and windows are still running on a Remote Desktop computer and consuming system resources.

By default, a user’s RDP session in Windows may stay in the disconnected state until terminated by the user or administrator, or until the computer is restarted. It is quite convenient, since a user may any time connect to his previous remote desktop session and continue working with running apps and open files.

The following screenshot shows that disconnected user sessions on an RDS server running Windows Server 2019 consume about 40% of the server RAM.

disconnected user session on rds host

Automatically Log off Disconnected and Idle Remote Desktop User Sessions

To automatically end disconnected RDP/RDS sessions in a specified period of time, you need to set session limits (timeouts) correctly.

If you have a Remote Desktop Services farm deployed on Windows Server, you can configure user session timeout settings in the RDS collection settings on the Session tab.

Specify the time period, after which you want to kill a disconnected remote desktop session, at the End a disconnected session option (by default, an RDP session duration is unlimited – Never). You can also set the maximum time of an active user session (Active session limit) and end an idle session (Idle session limit). These hard timeouts are applied to all user sessions in the RDS collection.

RDS server timeouts in session collection properties on RD session host

In Windows Server 2022/2019/2016/2012R2, you can set RDP session timeouts using Group Policies. You can do it either in the domain GPO editor (gpmc.msc) or in the Local Group Policy Editor (gpedit.msc) on a specific RDS host (or on a desktop version of Windows if you have allowed multiple RDP connections to it).

The settings of RDP session timeouts are located in the following GPO section Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Session Time Limits. The following Remote Desktop timeout settings are available:

  • Set time limit for disconnected session;
  • Set time limit for active but idle Remote Desktop Services sessions — the policy allows to end idle RDP sessions that have no user input (like moving a mouse or typing something on a keyboard);
  • Set time limit for active Remote Desktop Services sessions — it is the maximum time of any RDP session (even an active one), after which it switches to the disconnected state;
  • End Session when time limits are reached — sets the time, after which an RDP session will be terminated (logoff) instead of disconnecting it;
  • Set time limit for logoff of RemoteApp sessions.
configure RDP/RDS session time limits via GPO

By default, these options are not configured. To automatically end all disconnected RDP user sessions in 8 hours, enable the “Set time limit for disconnected sessions” policy and select 8 hours in the dropdown list.

"Set time limit for disconnected session" - group policy parameter to restrict rdp session time

Save the changes and update the Group Policy settings on your RD host (gpupdate /force). New timeout settings will only be applied to new RDP sessions (you will have to end the current user sessions on RDSH manually ).

GPO settings take precedence over timeout settings in the RDS collection.

You can find the same RDP timeout settings in the user GPO section: User Configuration -> Administrative Templates -> Windows Components. Using the policy from the user section, you can more flexibly configure user groups with different limits on the duration of RDP sessions.

You can also set RDP session time limits through the registry. The following DWORD parameters from HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services registry key corresponding to the Group Policy options described above:

  • MaxDisconnectionTime
  • MaxIdleTime
  • MaxConnectionTime
  • MaxDisconnectionTime
  • RemoteAppLogoffTimeLimit

For example, to set the maximum duration for a disconnected RDP session to 15 minutes (90000 ms), you can change a registry parameter using the following PowerShell command:

Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name MaxDisconnectionTime -Type 'DWord' -Value 900000

You can also set the limits of an RDP session on the Settings tab in the properties of a local (lusrmgr.msc) or domain user (dsa.msc — Active Directory Users and Computers console). The following options are available here:

  • End a disconnected session;
  • Active session limit;
  • Idle session limit;
  • When a session limit is reached or connection is broken: “Disconnect from session” or “End session”;
  • Allow reconnection: “From any Client” or “From originating client only”.
rds session timeouts in user properties in active directory

You shouldn’t make RDP session timeouts too short, otherwise, user sessions will end almost immediately after they become inactive.

If you have an RD Gateway Server deployed for remote access to RDS hosts, you can configure separate timeouts for users connected via RDGW (open the connection authorization policy and go to the Timeouts tab).

In Windows Server 2008 R2, you could also set RDP session timeouts using a special tsconfig.msc (RD Session Host Configuration) console. It was enough to open the console and right-click RDP-Tcp -> Properties. The session timeout limits are located on the Sessions tab. However, there is no such console in newer Windows Server versions (although you can manually copy tsadmin.msc and tsconfig.msc files and use these consoles on newer Windows Server versions as well).

tsconfig.msc session limits on windows server 2008 r2

Remote Desktop Session Has Been Idle Over Its Time Limit

After configuring RDS timeouts users will see the following warning before disconnecting an idle session:

Idle timer expired
Session has been idle over its time limit.
It will be disconnected in 2 minutes.
Press any key to continue the session.

And before the user disconnect, the Event ID 26 is logged in the System Event Viewer.

Learn more about RDP connection logs.

event id 26: session time limit reached

You can disable this warning by setting the EnableTimeoutWarning = 0 in the WMI class Win32_TSSessionSettings.

Set-WmiInstance -Path "\\localhost\root\CIMV2\TerminalServices:Win32_TSSessionSetting.TerminalName='RDP-Tcp'" -Argument @{EnableTimeoutWarning=0}

Now, when Windows automatically ends idle RDP sessions, the user will receive the following message from the RDP client:

Your Remote Desktop Services session ended because the remote computer didn’t receive any input from you.
 Remote Desktop Services session ended - remote computer didn’t receive any input from you

In some cases, you may encounter this error in the RDP client:

Your Remote Desktop Services session has ended. Another user connected to the remote computer, so your connection was lost. Try connecting again, or contact your network administrator.

This means that someone else signed into the computer via RDP when the number of simultaneous RDP sessions on the computer is restricted by the Limit number of connections parameter (for example, only one remote session is available on desktop Windows versions). Or you have logged in to the RDP host from a new computer.

You can allow multiple connections under the same user account to the RDP host using the GPO option Restrict Remote Desktop Services users to a single Remote Desktop Services session = Disabled (under Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections).

gpo: restrict RDS user to single session

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как поставить приоритет интернета на игру в windows 10
  • Macrium reflect free перенос windows 10 c ssd на ssd
  • Дефрагментация реестра windows 10 нужно ли
  • Команда для чистки реестра windows 10
  • Как увеличить басы на пк windows 10