Skip to content

pqFlush() — connection not open

pqFlush() — connection not open

This error is written to pg.log when user sesisons gets timed out. One of the possible cause is that the users max query limit is reached.

Check the max query ttimeout set for the user by running below query.

SYSTEM(ADMIN)=> select USERNAME, SESSIONTIMEOUT, QUERYTIMEOUT from _v_user where username like ‘user123’;
user123 | 120 | 60
(1 row)

Like, above example says the query will timeout is user123 run a query which will not finish in 60 minutes.

Then check psotgres logs to verify that this user query ran for 60 moniutes and then failed with above error.

Now, you need to identify if his user is running a legitmate query and if this user needs to run this query then possibly you may have to increase the query timeout limit.