SAS® Enterprise Guide® might disconnect from a workspace server when running specific programs


Problem

If you submit a job that generates an abnormally large log, SAS Enterprise Guide might display the following error:

An error occurred executing the workspace job "job_name". The server is disconnected.

If SAS Enterprise Guide logging is enabled, the following error is logged:

ERROR SAS.Shared.Exceptions.ServerExceptionHelper [(null)] - MapException() - Mapping error for:
System.Runtime.InteropServices.COMException (0x80010108): The object invoked has disconnected from its clients.
(Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))

Causes

1. SAS Integrated Object Model (IOM) servers queue log messages by default and send them to the client at the end of processing. Running code that generates lots of log lines can result in the server running out of memory, thus disconnecting from SAS Enterprise Guide. 

2. You use a LIBNAME statement with the SQLSVR engine and your password is greater in length than 14 characters. To resolve this issue, see SAS Note 57842, "The workspace server disconnects when you are using SAS/ACCESS® to Microsoft SQL Server."

 

Workarounds for Cause 1

Starting in SAS® 9.4M5, a new internal option that is called IOMLOGAUTOFLUSH can instruct the server to send log messages to the client during processing. This option allows the log to be streamed to the client, similar to how the log streams in Display Manager. It also has the side effect of preventing the server from running out of memory, because it no longer queues log messages. This option can be used with any SAS Enterprise Guide version, but it requires running against a 9.4M5 server. This option is implemented by default in a future release of SAS Enterprise Guide. To use this option now against a 9.4M5 release, add the following OPTIONS statement to the top of the program:

OPTIONS IOMLOGAUTOFLUSH;

Also, this option can be placed in Tools ► Options ► SAS Programs ► Submit SAS code inside SAS Enterprise Guide when the server is connected. This option can be enabled every time a user connects to the server. 

If the job in question generates the error soon after being submitted, try redirecting the streamed SAS log by adding the following code to the top of the program. Then submit the program again.

proc printto log="c:\path-on-server\EG.log";
run;

Then, check the SAS log to verify that the program has completed. If it did complete, then redirecting the log is the only current workaround.

 

Additional Information

The error shown above might also be seen when a network issue causes a disconnect between the SAS Enterprise Guide client and the SAS Server. See SAS KB0036245, "Network firewalls might prematurely terminate long-running tasks or queries submitted from SAS® Enterprise Guide®."

For more information about SAS Enterprise Guide logging, see SAS Note 17730, "Turning on logging in SAS® Enterprise Guide® 4.2, 4.3, 5.1, and 6.1."