From: Gunnar R|nning <gunnar@candleweb.no>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Mount <petermount@it.maidstone.gov.uk>
Cc: 'Gunnar R|nning' <gunnar@candleweb.no>
Cc: pgsql-interfaces@postgresql.org, "PostgreSQL Developers List (E-mail)" <hackers@postgresql.org>
Subject: Re: Postgresql 7.0 JDBC exceptions - broken connections ?
Date: 27 May 2000 11:30:27 +0200
Message-ID: <x666s0uyq4.fsf@thor.candleweb.no> (raw)
References: <1B3D5E532D18D311861A00600865478CF1AE65@exchange1.nt.maidstone.gov.uk>
<1866.959353996@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> I think that this and the "Tuple received before MetaData" issue could
> have a common cause, namely running out of memory on the client side
> and not recovering well. libpq is known to emit its equivalent of
> "Tuple received before MetaData" when the backend hasn't violated the
> protocol at all. What happens is that libpq runs out of memory while
> trying to accumulate a large query result, "recovers" by resetting
> itself to no-query-active state, and then is surprised when the next
> message is another tuple. (Obviously this error recovery plan needs
> work, but no one's got round to it yet.) I wonder whether the JDBC
> driver has a similar problem, and whether these queries could have
> been retrieving enough data to trigger it?
>
This could be a possible explanation, as some of the queries may indeed
retrieve large amounts of data. I have also noticed a couple of "Out of
Memory" exceptions that could be related(This seem to be "temporary" out of
memory exceptions, and not permanent memory leaks; so I guess these could
be caused by queries returning huge amounts of data).
> Another possibility is that the client app is failing to release
> query results when done with them, which would eventually lead to
> an out-of-memory condition even with not-so-large queries.
I don't think this is the case. I've been running the application through
OptimizeIT to profile memory and CPU usage and I haven't been able to spot
any memory leakages in the driver; The quality of the JDBC driver is
actually our main reason to migrate our application to PostgreSQL.
regards,
Gunnar
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: gunnar@candleweb.no, tgl@sss.pgh.pa.us, petermount@it.maidstone.gov.uk, hackers@postgresql.org
Subject: Re: Postgresql 7.0 JDBC exceptions - broken connections ?
In-Reply-To: <x666s0uyq4.fsf@thor.candleweb.no>
* 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