TheManBehindTheMan
TheManBehindTheMan

Reputation: 61

Postgres Query Timing out after 30 Seconds

There is a Query that keeps timing out exactly after 30 seconds. I have seen a few posts on Stackoverflow which are similar to the issue i'm facing, the only thing that makes my issue different is that, i'm not using a DSN-LESS Connection, I'm using ODBC ADMINISTRATOR.

The following Error is the error i'm receiving:

16:33:16.06 System.Data.Odbc.OdbcException (0x80131937): ERROR [57014] ERROR: canceling statement due to statement timeout;

I guess my question is, how can i go about increasing the connection timeout using ODBC Administrator ?

Any help would be appreciated

Upvotes: 1

Views: 6388

Answers (1)

pifor
pifor

Reputation: 7892

You can try to run in each database session something similar to:

postgres=# set statement_timeout='300s';
SET
postgres=# show statement_timeout;
 statement_timeout 
-------------------
 5min
(1 row)

postgres=#

To avoid doing this in each database session it would be easier to change this parameter in postgresql.conf: the new setting would be enabled for all database sessions.

Upvotes: 4

Related Questions