X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6CF3F11F8C3B for ; Wed, 19 Apr 2006 14:23:00 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.239 X-Spam-Level: X-Spam-Status: No, score=0.239 required=5 tests=[AWL=0.239] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id sOo6VO1nGiFt for ; Wed, 19 Apr 2006 14:22:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by postgresql.org (Postfix) with ESMTP id B4DF411F61EB for ; Wed, 19 Apr 2006 14:22:54 -0300 (ADT) Received: from [82.71.34.132] (helo=eb-l) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1FWGOC4BNw-0003fX; Wed, 19 Apr 2006 19:22:53 +0200 From: "Ed Blackmore" To: pgsql-jdbc@postgresql.org Date: Wed, 19 Apr 2006 18:21:58 +0100 MIME-Version: 1.0 Subject: Re: connection reset error, followed by broken pipe (pg74.213.jdbc3.jar) Reply-to: me@edblackmore.net Message-ID: <44467FC6.27310.20B6E57@localhost> X-mailer: Pegasus Mail for Windows (4.21c) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Provags-ID: kundenserver.de abuse@kundenserver.de login:3d3a28ce18dec69b79e8d7cc3ed9d7df X-Archive-Number: 200604/134 X-Sequence-Number: 15068 Hi Markus, Thankyou for your assistance. > So it seems that the network connection breaks from time to time > Independently from making your application more robust, you might want > to put some research into that. Yes, I put a minutely ping script in place, which wasn't able to detect a failure at a time when the connection was lost. The servers are dedicated server (installed and hosted by another company), so I've been trying to detect any outages to report to them. > If you're using the tomcat connection pooling, my proposed solution > there might help you Thanks, I tried the following settings based on your idea looking for similar tomcat settings on google: In webapps/ourapp/META-INF/context.ml, adding: testOnBorrow true testOnReturn true validationQuery select version() 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? Regards, Ed