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 0E7DE11F625E for ; Tue, 18 Apr 2006 08:00:25 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.088 X-Spam-Level: X-Spam-Status: No, score=-2.088 required=5 tests=[AWL=0.376, 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 IJWSAYLgvz2A for ; Tue, 18 Apr 2006 08:00:15 -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 1F0A711F624A for ; Tue, 18 Apr 2006 08:00:12 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (Tba08.t.pppool.de [89.55.186.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id E5AED656CD; Tue, 18 Apr 2006 13:01:11 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 378D0181C1F3F; Tue, 18 Apr 2006 13:00:30 +0200 (CEST) Message-ID: <4444C6CE.40402@logix-tt.com> Date: Tue, 18 Apr 2006 13:00:30 +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: <4444D29F.1565.A24EB9@localhost> In-Reply-To: <4444D29F.1565.A24EB9@localhost> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archive-Number: 200604/128 X-Sequence-Number: 15062 Hi, Ed, Ed Blackmore wrote: > I'm having trouble with a tomcat-postgres installation. Server 1 runs > postgresql and tomcat, server 2 has an identical tomcat installation > and application code running (except rebranding). Server 2 has errors > about every week with 'connection reset' in logs/appname.date.log, > futher connection attempts have a 'broken pipe' error. 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. > The solution to get the app running again is to restart tomcat. There was a thread here some days ago with the title "No automatic reconnect after network error", you might have a look there. If you're using the tomcat connection pooling, my proposed solution there might help you: | At least JBoss, you can use the following approach: In the Datasource | definition, put the following: | | | | boo | jdbc:postgresql://localhost:5432/bar | [ ... other attributes ... ] | SELECT version() | SELECT | version() | | | | This validates the connection before it is handed out on the | application, and throws away invalid connections. Be aware that the SQL | is case sensitive, we had a problem with earlier versions of OpenMDX/CRX | that had upper case letters in the tags so they were ignored by jboss. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org