From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rich Ryan <postgres@weblynk.com>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Inifinite socket send from backend to java servlet
Date: Wed, 03 Nov 1999 01:09:13 -0500
Message-ID: <18859.941609353@sss.pgh.pa.us> (raw)
In-Reply-To: <00ab01bf25b8$1192b260$9befaace@usedcars.com>
Rich Ryan <postgres@weblynk.com> writes:
> I'm running RH Linux 5.2, Jdk 1.1.7v3 on machine A, and RH Linux 6.1,
> postgres 6.5.2 on machine B. Some queries made from A to B never return. It
> looks like the java servlet on machine A skipped out on the query or the
> thread died or got interrupted or something, and machine B is infinitely
> waiting for it to read query results.
I'm not qualified to comment on (nor interested in) the problem with the
java servlets, but I'd say they are pretty buggy if they're dying in the
middle of reading query results.
However, the backend ought to recover gracefully from client failure,
and if it's not then I'm interested in that.
> I get a ton of these messages...
> FATAL: pq_endmessage failed: errno=32
> pq_flush: send() failed: Broken pipe
> Within a half day or so, my database connection pool is exhausted because
> there taken up by these infinite waits.
What is supposed to happen is that you get a few of these messages in
the log while the backend tries to dump out the query results to the
no-longer-connected client (maybe more than a few of them, if it was a
big query :-(), and then when the backend finishes the query and tries
to read the next command from the client, it notices that the client
connection isn't there anymore, and gracefully exits. Apparently you've
found a combination of circumstances where this doesn't happen like it's
supposed to. I have no immediate ideas about why. Can anyone else
reproduce this problem?
regards, tom lane
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: tgl@sss.pgh.pa.us, postgres@weblynk.com
Subject: Re: [INTERFACES] Inifinite socket send from backend to java servlet
In-Reply-To: <18859.941609353@sss.pgh.pa.us>
* 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