idle in transaction, why

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: idle in transaction, why
Date: 2017-11-06 19:32:40
Message-ID: 4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johannes Graën 2017-11-06 19:43:33 Re: Combine multiple text search configuration
Previous Message John R Pierce 2017-11-06 18:18:09 Re: Postgresql 9.3 service doesn't start on RedHat Linux 6.8