You can use TurnkeyTimeoutMinutes to end an inactive MDriven Turnkey Streaming client view and direct the user to a timeout page, reducing the time that inactive clients keep server resources allocated.
What TurnkeyTimeoutMinutes controls
TurnkeyTimeoutMinutes defines how long a client screen may remain without user interaction before the timeout behavior is applied. It is used by MDriven Turnkey applications that use Streaming views.
A Turnkey server keeps an active memory space for each active Streaming client. While the client is active and connected, that client uses server memory. Configure a timeout when an inactive user should be moved away from the Streaming UI to an MVC page that does not require those server resources.
By default, no timeout is active. The default value is -1.
Configure a timeout for the server
Configure the default timeout for all pages in TurnkeySettings.xml.
- Open
TurnkeySettings.xmlfor the Turnkey server. - Add or update the
TurnkeyTimeoutMinutessetting. - Set the value to the required number of minutes.
For example, the following configuration sets a one-minute timeout:
<TurnkeyTimeoutMinutes>1</TurnkeyTimeoutMinutes>
This is a server-wide default. For example, with the value 1, a client screen with no user interaction is subject to timeout after one minute.
For the other available Turnkey server settings, see Documentation:TurnkeySettings.
Override the timeout for one ViewModel
You can configure a different timeout for an individual ViewModel. Set the tagged value named TurnkeyTimeoutMinutes on that ViewModel.
The ViewModel-specific tagged value takes precedence over the value in TurnkeySettings.xml.
For example:
- The server setting is
<TurnkeyTimeoutMinutes>1</TurnkeyTimeoutMinutes>. - A ViewModel has the
TurnkeyTimeoutMinutestagged value set to5. - Clients using that ViewModel use the five-minute setting; other pages use the server-wide one-minute setting.
Provide the timeout page
Turnkey includes a basic built-in Timedout page that is used by default.
To use your own timeout-page design:
- Create a ViewModel named
Timedout. - Make that ViewModel an MVC page.
- Design the page for users whose Streaming view has timed out.
The custom Timedout ViewModel is used after the configured timeout. It must be an MVC page; a non-MVC ViewModel will not work as the timeout page.
Related timeout and session settings
Do not confuse TurnkeyTimeoutMinutes with RemoveTurnkeyAppAfterMinutes:
| Setting | Controls |
|---|---|
TurnkeyTimeoutMinutes
|
How long a client screen continues to show the UI without user interaction. |
RemoveTurnkeyAppAfterMinutes
|
How long a Turnkey session may be disconnected from the network before it is a candidate for shutdown. The user loses unsaved changes when that shutdown occurs. |
Read Documentation:Turnkey Client Timeout for the timeout behavior and memory rationale, and Documentation:TurnkeySettings for the server configuration settings.
