Re: BUG #2060: Issue with Data base connection

From: Kris Jurka <jurka(at)ejurka(dot)com>
To: kalisetty manideep <mani7deep(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2060: Issue with Data base connection
Date: 2005-11-23 19:44:52
Message-ID: 4384C6B4.1090603@ejurka.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

kalisetty manideep wrote:
> [Backend reports "too many open connections"]
>
> But I am 100% sure that its not the issue with the
> code.
>
> Do you know any Postgresql - JDBC driver, which is not
> from Postgresql development group. I think JDBC driver
> is not closing the connection even though I am closing
> the connection.

I have no reason to believe that and you certainly haven't shown that.

> Please refer to the DBACCESS file attached.
>

All this shows is the Connection being opened, not closed.

I've implemented an idea I got from rupa in #postgresql a while ago
about a way of logging leaked connections. I've added some code to the
Connection's finalize() method that prints some logging information if
the Connection was not closed. This is enabled by using the new
logUnclosedConnections URL parameter.

See the attached code for an example. I've put up a new jar that
contains this here: http://www.ejurka.com/pgsql/jars/km

Attachment Content-Type Size
OpenConn.java text/x-java 379 bytes

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2005-11-23 20:20:56 Re: strange disappearence of postgres file
Previous Message Tom Lane 2005-11-23 17:27:41 Re: Incorrect column identifer using AS in SELECT statement on a VIEW.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2005-11-23 20:52:43 Re: [JDBC] BUG #2060: Issue with Data base connection
Previous Message Kris Jurka 2005-11-23 18:41:52 Re: Why is bool == java.sql.Types.BIT ??