postgresql - Connection lost error in SAS Studio on SQLPrepare with Postgres - Stack Overflow

admin2025-04-15  2

While running Flows in SAS Studio it happens that the next step, which is not using a SAS Work table but one of the library connected postgres tables, fails* due to an disconnection error labeled as:

ERROR: CLI prepare error: SQLPrepare unable due to the connection lost

*: sometimes it keeps on 'running' without failing for several minutes, and a total freeze of that flow and a failing connection to show the a library table indicates that it probably failed...


  • Platform: SAS® Studio - (Stable) 2024.12 @SAS Viya
  • Database: PostgreSQL
  • Connection: SAS defined Library with 'SAS/Access to Postgres' and Authdomain, through a VPN tunnel

It doesn't matter the type of the step (e.g. Query, Filter, ...), but it appears to happen if a flow is running for a longer timespan, or if the last disconnect is more than 15/30 minutes ago. (Which I tried to measure but was inconclusive)

A quick fix is to reconnect the library and repeat the failed step, but sometimes a complete reset of the session is needed, resetting the flows progress and work tables in the progess.


I cannot rule out that the core problem is somewhat related to an occasional I/O error on GET request, which seems not to correlate, but appears also in that same environment.

转载请注明原文地址:http://www.anycun.com/QandA/1744725171a86753.html