Re: Memroy leak with jdbc

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Memroy leak with jdbc
Date: 2003-05-06 00:58:45
Message-ID: 20030506005845.GB6181@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, May 05, 2003 at 07:32:25PM -0400, Joseph Shraibman wrote:
> Using this test case with 9000 interations I get this output:
>
> used: 474,296 free: 1,557,320 total: 2,031,616 max: 67,108,864
> ....................................................................................................
> used: 4,646,760 free: 3,643,544 total: 8,290,304 max: 67,108,864
> =================
> used: 4,607,728 free: 3,682,576 total: 8,290,304 max: 67,108,864
>
> I have no idea why this memory leak is happening. It only happens with this
> one select statement, not all select statements.

The "leak" is SQLWarning objects piling up on the (single) Connection object
you are using:

java.sql.SQLWarning: NOTICE: Adding missing FROM-clause entry in subquery for table "taba"

(intuitively I'd have thought these should appear on the Statement not the
Connection, but I haven't looked at the JDBC spec to check)

> line = "select (select pu from tabpu where pukey = taba.puindex and ukey = tabu.ukey) from tabu where ukey = 3 and akey = 1;";
> Statement st = null;
> st = db.createStatement();
> ResultSet rs = st.executeQuery(line);

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Joseph Shraibman 2003-05-06 01:00:53 Re: Memroy leak with jdbc
Previous Message Joseph Shraibman 2003-05-06 00:18:23 Re: Memroy leak with jdbc