X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id E050011F6B7E for ; Thu, 20 Apr 2006 04:46:16 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.134 X-Spam-Level: X-Spam-Status: No, score=-2.134 required=5 tests=[AWL=0.330, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id Q5FURUJdACUg for ; Thu, 20 Apr 2006 04:46:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 01E3C11F6997 for ; Thu, 20 Apr 2006 04:46:12 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (T96ed.t.pppool.de [89.55.150.237]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id A0E06656CD; Thu, 20 Apr 2006 09:47:11 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id E7848181C1F52; Thu, 20 Apr 2006 09:46:26 +0200 (CEST) Message-ID: <44473C52.2040105@logix-tt.com> Date: Thu, 20 Apr 2006 09:46:26 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: me@edblackmore.net Cc: pgsql-jdbc@postgresql.org Subject: Re: connection reset error, followed by broken pipe (pg74.213.jdbc3.jar) References: <44467FC6.27310.20B6E57@localhost> In-Reply-To: <44467FC6.27310.20B6E57@localhost> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archive-Number: 200604/136 X-Sequence-Number: 15070 Hi, Ed, Ed Blackmore wrote: > I wasn't able to nicely induce the error through our firewall or > taking connections down, but restarting postgresql did lead to a > broken pipe error. The above fix didn't help in this scenerio. > > Reading other posts it seems that the jdbc driver is not expected to > reopen connections, therefore it doesn't seem using a newer version > will help. Given that our tomcat app doesn't reconnect to a > postgresql db after it (the database) has been restarted, is it > correct I need to work with the app developer as to how we use the > connection pool, or are there configuration changes that can help? Yes, that's true. My workaround protects against a pool handing out broken connections[1], but the Application still must get a fresh connection ittself. Most JSP pages and Servlets I've seen get such a connection on every incoming request, most Servlets I've written refresh their connection when an appropriate SQL exception happens. I think that this is the way your app has to be modified - refresh the SQL connection in case of an Exception. HTH, Markus [1] Before java 1.6, the pool has no (easy and portable) way to tell whether a connection is still valid. -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org