A session time-out issue occurs in SAS® Enterprise Guide® with SAS® Viya® platform integration


SAS® Enterprise Guide® 8.4 and later might disconnect from the SAS Viya Compute session if the session remains inactive.

Overview: How SAS Enterprise Guide 8.4 and SAS® Enterprise Guide® 8.5 Are Currently Designed to Handle Compute Session Timeouts

Change the Default Compute Session Inactivity Time Out

To change the default Compute session inactivity time-out (90 minutes) that SAS Enterprise Guide uses, set the Viya_ComputeSessionInactiveTimeoutSeconds configuration property in the SEGuide.exe.config file, which is located in the SAS Enterprise Guide installation directory. By default, this path is as follows: C:\Program Files\SASHome\SASEnterpriseGuide\8.
Note that this process might require local administrative rights to edit the SEGuide.exe.config.

For example, add the following to the SEGuide.exe.config file to change the time-out to three hours instead of the default 90 minutes:

  <appSettings>

    <add key="Viya_ComputeSessionInactiveTimeoutSeconds" value="10800" /> <!-- in seconds -->

  </appSettings>

SAS® Enterprise Guide® 8.6 - New Time Out Features and Changes to the Time Out Option Behavior 

The client-side inactivity time-out feature was introduced in SAS Enterprise Guide 8.6, which resulted in a behavior change compared to previous versions. To manage session persistence, you can configure the keep-alive and heartbeat settings using the following SAS Enterprise Guide configuration options.

You can configure all three parameters in the SEGuide.exe.config file, which is located at C:\Program Files\SASHome\SASEnterpriseGuide\8.

Here is an example:

<appSettings>
    <add key="Viya_ComputeSessionInactiveTimeoutSeconds" value="60" />
    <add key="Viya_Send HeartbeatIntervalSeconds" value="10" />
    <add key="Viya_ApplicationInactiveTimeoutSeconds" value="120" />
</appSettings>

Viya_ComputeSessionInactiveTimeoutSeconds

(Default Value = 300 seconds (5 minutes))

This option controls the settings that you place on the SAS Viya platform Compute sessions that you create. This option instructs the Compute session about when it should terminate itself. If the Compute session is being used, or if you hit any compute endpoints, the timer resets. However, once a Compute session does not receive any correspondence from SAS Enterprise Guide (and is not actively running a job), the session times out after this period elapses.

This option might seem a bit short, but it is designed so that you do not leave Compute sessions lying around for too long after they are created and no longer needed.

Viya_SendHeartbeatIntervalSeconds

(Default Value = 30 seconds)

This option controls how often SAS Enterprise Guide sends a heartbeat to the SAS Viya platform Compute session. Every time this interval occurs, you should check how long SAS Enterprise Guide has been inactive. (See the next option for additional information.) If SAS Enterprise Guide has not exceeded the application time out, then SAS Enterprise Guide will make a small query on the Compute session or send the heartbeat to the Workbench.  

Note that you MUST keep this option smaller than ComputeSessionInactiveTimeoutSeconds. Otherwise, the Compute session could potentially time itself out between heartbeat intervals.

Viya_ApplicationInactiveTimeoutSeconds

(Default Value = 5400 seconds (90 minutes)

This option controls how long SAS Enterprise Guide must be inactive before it will stop sending heartbeats to the Compute session and the Workbench. Any user interaction with the SAS Enterprise Guide main window, such as a mouse click or a keystroke, resets the timer.  

Note: There are special cases for this setting.

Summary

Here is a summarization of the sequence of events that lead to the Compute session shutting down: