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 006955E4803 for ; Mon, 6 Sep 2004 02:56:24 +0100 (BST) 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 11295-06 for ; Mon, 6 Sep 2004 01:56:23 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id D6D1B5E483B for ; Mon, 6 Sep 2004 02:56:18 +0100 (BST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1C48ju-0006AG-00; Mon, 06 Sep 2004 13:56:14 +1200 Message-ID: <413BC3B0.7090500@opencloud.com> Date: Mon, 06 Sep 2004 13:56:00 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mike Bridge Cc: pgsql-jdbc@postgresql.org Subject: Re: Connections dropped randomly References: <20040902170953.A19017@bridgecanada.com> In-Reply-To: <20040902170953.A19017@bridgecanada.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/11 X-Sequence-Number: 10901 Mike Bridge wrote: > I find that if I reuse a jdbc connection to perform a number of > update queries (e.g. 1000), the connection keeps getting dropped > after a random number of iterations. > > This occurs in all sorts of queries throughout my application. Any > idea what might be causing this? I'm not doing anything > out-of-the-ordinary, and it happens on both prepared statements > and regular statements. The usual cause of lost connections is a stateful firewall (or NAT, etc) between the client and server. If a connection stays idle for too long, the firewall may consider that connection dead and reject subsequent traffic on it. The driver doesn't discover this until the next time the connection is used. If that's not it, at a minimum we'd need to see a stack trace of the error you get to diagnose this any further. -O