[GENERAL] idle in transaction, why - Mailing list pgsql-general

From Rob Sargent
Subject [GENERAL] idle in transaction, why
Date
Msg-id 4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com
Whole thread Raw
Responses Re: [GENERAL] idle in transaction, why  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general

Using postgres 10-beta3 (hopefully 10.0 this week) on virtual CentOS7 and this JDBC driver postgresql:42.1.4


The postgresql.conf file has

#idle_in_transaction_session_timeout = 0        # in milliseconds, 0 is disabled

my db url has "?prepareThreshold=0" since I bump into "already defined" statements otherwise

but I'm getting

org.jooq.exception.DataAccessException: SQL [select "projectfile"."id", "projectfile"."name", "projectfile"."filetype", "projectfile"."uri", "projectfile"."people_id" from "projectfile" where "projectfile"."uri" = ?]; ERROR: idle transaction timeout

<lots of calls>2017-11-06T11:32:20-07:00  -  -  - Caused by: org.postgresql.util.PSQLException: ERROR: idle transaction timeout
2017-11-06T11:32:20-07:00  -  -  - at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477)
2017-11-06T11:32:20-07:00  -  -  - at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190)
2017-11-06T12:12:43-07:00  -  -  - at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300)

2017-11-06T12:12:43-07:00  -  -  - at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)

2017-11-06T12:12:43-07:00  -  -  - at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)

2017-11-06T12:12:43-07:00  -  -  - at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169)

2017-11-06T12:12:43-07:00  -  -  - at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:158)


at various calls, sometimes the first one, sometime several calls later (some select, some insert), all in a transaction initiated in my code. From what I can piece together from the bind values all the queries are sound - at least the selects expected to find things work as expected.


Where should I be looking?


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: [GENERAL] Postgresql 9.3 service doesn't start on RedHat Linux6.8
Next
From: Johannes Graën
Date:
Subject: Re: [GENERAL] Combine multiple text search configuration