From: Markus Schaber <schabi@logix-tt.com>
To: Sriram Dandapani <sdandapani@counterpane.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: idle in transaction
Date: Sat, 16 Sep 2006 10:26:48 +0200
Message-ID: <450BB548.2070506@logix-tt.com> (raw)
In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF05DF1974@ca-mail1.cis.local>
References: <6992E470F12A444BB787B5C937B9D4DF05DF1974@ca-mail1.cis.local>
Hi, Sriram,
Sriram Dandapani wrote:
> I use postgres 8.1.2 database and postgres 8.1.404 jdbc driver .
>
> I keep seeing “idle in transaction” connections on the postgres box all
> the time. The application logic closes all connections, so it makes me
> wonder if the driver is issuing a begin statement after every commit to
> leave a floating transaction open.
Current driver versions (and 8.1.404 is current enough) should not show
this behaviour any more, which was annoying in older drivers.
Are you shure that you have the correct driver version? We occasionally
get reports from users thinking they run a certain driver version, but
they accidentally have another driver earlier in the class search path.
Especially the $JRE/lib/ext directory is dangerous, people tend to drop
.jars there and then forget them.
Another possibility is that you use a broken connection pooling that
fails to reset the connections properly. Could you modify your
application logic to set all connections to autocommit mode before
closing / returning them to the pool?
HTH,
Markus
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-jdbc@postgresql.org
Cc: schabi@logix-tt.com, sdandapani@counterpane.com
Subject: Re: idle in transaction
In-Reply-To: <450BB548.2070506@logix-tt.com>
References: <6992E470F12A444BB787B5C937B9D4DF05DF1974@ca-mail1.cis.local> <450BB548.2070506@logix-tt.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