Wednesday, 29 June 2016

Configuring Session Timeout - Navision 2016

Dynamics NAV Windows client timeout configuration is managed at the service level by setting the Idle Client Timeout setting.

To configure the Dynamics NAV Windows client to time out after 10 minutes of idleness, you will require to set this to 00:10:00 and then restart the Dynamics NAV Server service so that the change comes in effect.

There are some additional settings

ClientServicesReconnectPeriod

ClientServicesMaxNumberOfOrphanedConnections,

When you start the Microsoft Dynamics NAV Windows client or Microsoft Dynamics NAV Web client, a connection is established with the Microsoft Dynamics NAV Server instance and a corresponding session is added on Microsoft Dynamics NAV Server.

Microsoft Dynamics NAV Server includes several timeout settings that determine when a session closes as a result of inactivity over the client connection, lost client connection, or closing of the client.

You can configure this in CustomSettings.config file of Microsoft Dynamics NAV Server.

ClientServicesReconnectPeriod :- This value determines the time during which a client can reconnect to an existing session on Microsoft Dynamics NAV Server before a session closes.

ClientServicesIdleClientTimeout :- This value determines the interval of time that a Microsoft Dynamics NAV client connection can remain inactive before the session is closed.

You can configure this in the ClientSettings.config file of the Microsoft Dynamics NAV Windows client.

ClientServicesKeepAliveInterval :- This value determines the interval of time (in seconds) between keep-alive messages that are sent from the Microsoft Dynamics NAV Windows client to Microsoft Dynamics NAV Server. This value is also used, in part, to define the reconnect period when a connection is lost.

You can configure this in the web.config file of Microsoft Dynamics Web Server for the client.

SessionTimeout :- This value specifies how much of time that session remains open when there is no activity over the connection from the Microsoft Dynamics NAV Web client to Microsoft Dynamics NAV Server.

SessionTimeOut-1

The SessionTimeout setting enables you to set the Microsoft Dynamics NAV Web client inactive session timeout different than for the Microsoft Dynamics NAV Windows client, which is only controlled by the ClientServicesIdleClientTimeout setting.

Typically, this is set the inactive session timeout period on Microsoft Dynamics NAV Web client connections shorter than for the Microsoft Dynamics NAV Windows client.

When the Microsoft Dynamics NAV Windows client is inactive, reliable sessions automatically sends messages from the Microsoft Dynamics NAV Windows client to Microsoft Dynamics NAV Server.

You can control the interval of the keep-alive messages by setting the ClientServicesKeepAliveInterval setting on the Microsoft Dynamics NAV Windows client.

The default value of the ClientServicesKeepAliveInterval setting is 120 seconds (2 minutes).

If there is no activity on the client connection for duration of the load balancer's idle timeout setting, then the load balancer might redirect the client connection to another server.

To avoid this condition, it is recommend that set the ClientServicesKeepAliveInterval to half the value of the load balancer’s idle timeout setting.

The idle timeout on Windows Azure is around 4 minutes, so the default setting of ClientServicesKeepAliveInterval (2 minutes) should be sufficient.

Occasionally, a Microsoft Dynamics NAV client can lose the network connection to Microsoft Dynamics NAV Server.

You can use ClientServicesReconnectPeriod setting on Microsoft Dynamics NAV Server to control how long a session remains open after the connection is lost to allow time for the client to reconnect to the session.

 

SessionTimeOut-2

  • The connection is lost and the initial inactivity period starts (default is 4 minutes).

  • After the initial inactivity period, the service channel enters a faulted state. When the service channel is in the faulted state, Microsoft Dynamics NAV Server considers the session with the client as orphaned and waits for it to reconnect.

  • If the client does not reconnect within the time period that is specified by the ClientServicesReconnectPeriod setting (default is 10 minutes), then Microsoft Dynamics NAV Server closes the session.

  • The session is then removed from the Active Session table in the Microsoft Dynamics NAV.


ClientKeepAlive:- This  setting is managed at the user level and located in the ClientUserSettings.config file.

The value of this setting is given in seconds and defines the interval between ‘pulse’ signals sent by the client to prevent the client from going idle in some scenarios, or for some users.

 

In Dynamics NAV 2016 Cumulative Update 8:

The ClientKeepAlive setting has been moved from the user level to the service level, and is no longer defined in number of seconds but as a time interval, just like the Idle Client Timeout setting.

 

Before Cumulative Update 8:

  1. In the server configuration file, set Idle Client Timeout  to 00:10:00

  2. In the client configuration file, set ClientKeepAlive  to any value  larger than 600 This value is in seconds, so 600 equals 10 minutes.


 

SessionTimeOut-3

After Cumulative Update 8:

  1. In the server configuration file, set Idle Client Timeout  to 00:10:00

  2. In the server configuration file, set Keep Alive Interval  to a value larger than 00:10:00


To configure the timeout for the Dynamics NAV Web client, it is sufficient to configure the SessionTimeout setting in the web.config file to the relevant interval – in above example it’s 00:10:00.

For more information you can check out here : https://community.dynamics.com/nav/b/navteam/archive/2016/06/24/configuring-client-timeout

 

 

No comments:

Post a Comment