Understanding and configuring the Session Down Grace Period in Parallels RAS

0 users found this article helpful

Symptoms

After a user logs off from a published application or desktop, Parallels RAS may briefly report the session in the Down state.

In Parallels RAS versions earlier than v22, this temporary state may generate unnecessary event notifications, including messages similar to the following:

Sending Agent '<agent-name>' ID [<id>] (RDSH) session in state down notification

If RAS agent event notifications are enabled, these transient state changes may result in repeated email notifications even though the session is completing a normal logoff and no persistent problem exists.

Cause

During a normal session logoff, a session may temporarily transition to the Down state before the session is fully terminated.

Starting with Parallels RAS v22, a 30-second grace period is applied by default. Parallels RAS waits during this period before reporting the session as Down to the Connection Broker.

This prevents short-lived state transitions during normal session termination from generating false-positive notifications.

Resolution

Option 1: Upgrade to Parallels RAS v22 or later

Upgrade the Parallels RAS environment to v22 or a later version. These versions apply a default session Down grace period of 30 seconds.

The setting is applied by the appropriate RAS agent:

Option 2: Configure the grace period manually

The grace period can be adjusted through the Windows Registry on the machine running the applicable RAS agent.

Important: The registry values are not created by default. To configure a custom value, create the SessionDownGracePeriod value manually under the appropriate registry key.

RAS Guest Agent

Setting Value
Registry key HKEY_LOCAL_MACHINE\SOFTWARE\Parallels\GuestAgent
Value name SessionDownGracePeriod
Value type REG_DWORD
Unit Seconds
Default value in RAS v22 and later 30

RAS Terminal Services Agent

Setting Value
Registry key HKEY_LOCAL_MACHINE\SOFTWARE\Parallels\TSAgent
Value name SessionDownGracePeriod
Value type REG_DWORD
Unit Seconds
Default value in RAS v22 and later 30
  1. Sign in to the machine running the applicable RAS agent.
  2. Open Registry Editor by running regedit.exe.
  3. Browse to the registry key for the installed agent:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Parallels\GuestAgent, or
    • HKEY_LOCAL_MACHINE\SOFTWARE\Parallels\TSAgent.
  4. Create a new REG_DWORD value named SessionDownGracePeriod.
  5. Open the value and select Decimal.
  6. Enter the required grace period in seconds. For example, enter 60 to configure a 60-second grace period.
  7. Restart the applicable RAS agent service or reboot the machine if required for the setting to take effect.

Example configuration

The following example configures a 60-second grace period for the RAS Terminal Services Agent:

Registry key:  HKEY_LOCAL_MACHINE\SOFTWARE\Parallels\TSAgent
Value name:    SessionDownGracePeriod
Value type:    REG_DWORD
Base:          Decimal
Value data:    60

With this configuration, a session must remain in the Down state for 60 seconds before Parallels RAS reports that state to the Connection Broker.

Note: Configure the registry value on every machine where the corresponding RAS agent is installed and where the behavior needs to be controlled.

Warning: Incorrectly modifying the Windows Registry can cause unexpected system or application behavior. Back up the relevant registry key before making changes.

Additional information

The grace period does not prevent a session from entering the Down state. It delays reporting that state to the Connection Broker so that short-lived transitions during normal session lifecycle operations can be filtered out.

If the session remains Down after the configured grace period, the state is still reported normally. A persistent Down state should therefore be investigated separately.

Was this article helpful?

Tell us how we can improve it.