Idle timer expired что это за ошибка
Перейти к содержимому

Idle timer expired что это за ошибка

  • автор:

Configuring RDP/RDS Sessions Limits (Timeouts) on Windows

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

Also, these sessions can block open files on your file servers, cause problems with incorrect saving of data in the apps, roaming profile folders, or on User Profile Disks. Disconnected RDP sessions often cause a domain user account lockout issue after a password change (when the RDS session continues to run under the user’s old password).

Using the quser command, you can view when a user RDP session was started, how long it was idle, and the current session state.

You can also display information about the duration of user sessions in the RDS farm using a PowerShell script (specify the FQDN of your RDS Connection Broker server):

$connectionBrocker = “mun-rdscb.woshub.com»
Get-RDUserSession -ConnectionBroker $connectionBrocker |select-object -Property CollectionName, HostServer, DomainName, UserName, ServerIPAddress, CreateTime, DisconnectTime, SessionState, IdleTime , SessionID , `
@ >

You can configure the maximum duration of active, disconnected, and idle (no user activity) sessions for Remote Desktop Services.

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 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

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).

remote desktop gateway: session timeout settings

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 rdp session message

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

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 @

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

 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:

RDP session ended - another user connected to the remote computer

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).

Fix: Session Has Been Idle Over its Time Limit – Idle Timer Expired Windows

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.

Настройка лимитов (таймаутов) для активных/отключенных RDP/RDS сессий в Windows

date15.11.2022
useritpro
directoryWindows 10, Windows Server 2019
commentsкомментария 32

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

По-умолчанию 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 , `
@ >

Вы можете настроить максимальную длительность активных, отключенных и простаивающих (без активности пользователя) сессии для 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 -> Службы удаленных рабочих столов -> Узел сеансов удаленных рабочих столов -> Ограничение сеансов по времени). Доступны следующие политики таймаутов:

  • Settimelimitfordisconnectedsession (Задать ограничение по времени для отключенных сеансов);
  • SettimelimitforactivebutidleRemoteDesktopServicessessions (Задать ограничение времени для активных, но бездействующих сеансов служб удаленных рабочих столов) – политика позволяет завершить простаивающие RDP сессии, в которых отсутствует ввод со стороны пользователя (движение мышкой, ввод символов с клавиатуры);
  • SettimelimitforactiveRemoteDesktopServicessessions (Задать ограничение по времени для активных сеансов служб удаленных рабочих столов) – максимальный срок для любой (даже активной) RDP сессии пользователя, после которого она переводится в состояние disconnected;
  • EndSessionwhentimelimitsarereached (Завершать сеанс при достижении ограничения по времени) – через какое время нужно завершать 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 сессий, которые задаются политиками можно также настроить напрямую через реестр. Указанным выше политикам соответствую следующие 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

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

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

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

В 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, пользователи увидит такое сообщение, перед завершением своей сессии:

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

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

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

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

Set-WmiInstance -Path «\\localhost\root\CIMV2\TerminalServices:Win32_TSSessionSetting.TerminalName=’RDP-Tcp'» -Argument @

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

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

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

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).

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

Предыдущая статьяПредыдущая статья Следующая статья Следующая статья

Idle timer expired что это за ошибка

since Jun/Jul 17 Update our Users are getting this message in fullscreen:

The timer is working as intended and disconnects the user sessions after 20 minutes (was set to safe Licenses for our customer). But before the above mentioned date the session just disconnects when in background. Now the Users are getting this fullscreen message and when they press "OK" the timer for idle sessions resets.

Was it a windows update that influenced the behavior of this message and is there a way to hide the message?<o:p></o:p>

Greetings from Germany,<o:p></o:p>

Все ответы

What’s the OS of client OS and version of mstsc.exe

According to the KB article below, it is expected behavior:

"This behavior occurs if a policy setting enforces a time limit for idle Remote Desktop sessions. If an active session has not received user input for the time that is specified in the policy setting, the session disconnects. Pressing a key closes the warning message that you receive two minutes before you are disconnected. However, this action does not reset the idle timer. To reset the idle timer and keep the session active, you must provide user input other than the keystroke that closes the warning message."

A Remote Desktop session disconnects even after you press a key when you receive the "Idle timer expired" message in Windows Vista

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *