pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: idle in transaction, why
Date: Mon, 6 Nov 2017 12:32:40 -0700
Message-ID: <4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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?

view thread (16+ messages)  latest in thread

Message-ID: <4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com>
Permalink:  ../4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com/
Also on:    postgresql.org/message-id/4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: idle in transaction, why
  In-Reply-To: <4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com>
  References: <4a365db4-8608-65c8-e3dc-23524f881bc3@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox