Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jun 13, 2022 4:45:38 AM
May 31, 2022 9:57:55 AM
Qlik Cloud fails using a Qlik PostgreSQL connector, where long running resource exhaustive (time-consuming) transaction from server side that takes time to respond to the client, with the following error:
Connector error:ERROR [08S01] [Qlik][PostgreSQL] (50) The connection has timed out, please reconnect.
(Connector error: ERROR [08S01] [Qlik][PostgreSQL] (50) The connection has timed out, please reconnect. Current connection status is: [SQLState 08S01] CONNECTION_BAD)","line":"","lineNumber":43},{"error":"General error","description":" (Connector error: ERROR [08S01] [Qlik][PostgreSQL] (50) The connection has timed out, please reconnect. Current connection status is: [SQLState 08S01] CONNECTION_BAD)
The reason for the disconnection could be that server or client lost communication due to a long-running query which did not come back, making both server and client wait for each other and hence transaction goes into an "Idle in transaction" state. In such situations, KeepAlive signals help in keeping the transaction intact between the parties. If not explicitly as session or server level, the default keepAlive settings from OS/system level are applied, which is 2 hours. So in case of any communication issue between client and server and the transaction has gone idle, it will timeout after 2 hours.
The solution to mitigate this is to add KeepAlive parameters and set a lower value, preferably lower than the total query time. For e.g. 1 minute or 100 secs
KeepAlive settings can be set at connection/session level using the Advanced Parameters section of Qlik PostgreSQL connector. See the example below (refer to Fig.1 below)
Fig.1
Qlik Cloud
Qlik ODBC Connector Package