You encounter the message "ERROR: Insufficient memory" when using PROC SQL in SAS® Viya®


Errors similar to the following can occur in SAS Viya when PROC SQL queries are run against large amounts of data:

ERROR: Out of memory while converting blob to table.
ERROR: PROC SQL runtime error for operation=sqxsrc.
ERROR: Insufficient memory
ERROR: Error parsing member tkctb_blob of cas.Table.
ERROR: Error parsing member of type cas.Value.
ERROR: Error parsing member results of cas.Response.
ERROR: An error has occurred.

These errors indicate that an out of memory condition is occurring in the SPRE process when the engine is reading data from the CAS server. Data is transferred in blocks between the client and server and is then converted from a transfer format to a format the engine can consume. Out of memory conditions can occur during this process.

There are three workarounds.