X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F10ED52815 for ; Mon, 4 Jul 2005 05:52:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69318-03 for ; Mon, 4 Jul 2005 08:52:39 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id B0115528CB for ; Mon, 4 Jul 2005 05:52:37 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DpMgw-0007zM-IL; Mon, 04 Jul 2005 20:52:38 +1200 Message-ID: <42C8F8D6.8040100@opencloud.com> Date: Mon, 04 Jul 2005 20:52:38 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jonas Partner Cc: pgsql-jdbc@postgresql.org Subject: Re: Write to outputstream in PGStream blocks indefinitely References: <9b8dd34605070401153340015c@mail.gmail.com> In-Reply-To: <9b8dd34605070401153340015c@mail.gmail.com> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/13 X-Sequence-Number: 13161 Jonas Partner wrote: > I am having a problem where by my application freezes after a period > of time under load. Doing a thread dump shows a large number of > threads seem to be attempting to write to output streams as shown > below. The application code is attempting to add a single row to a > table, including binary data of between 3kb - 10kb. This requires a > restart of the application to clear. > > Has anyone else seen similar behaviour? Could this be related to the > issue discussed in > http://archives.postgresql.org/pgsql-jdbc/2004-12/msg00096.php where > the server and driver are filling their respective buffers. If so > what is the best approach to reducing the likelyhodd of this > happening. It seems unlikely that this is the cause if you're only doing a single update.. Things to try: - Add '?logLevel=2' to your connection URL -- this should spew lots of driver debug info to stderr. - If the data's not sensitive, grab a tcpdump capture (-s 1514 -w /some/output/file) of a connection that hangs and send me a copy (off-list). - Attach gdb to the corresponding backend to see what it is doing when everything stops. Perhaps it's got stuck waiting for a lock, or something similar? -O