X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4CC29D1B33D for ; Thu, 22 Jul 2004 05:57:25 -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 08536-10 for ; Thu, 22 Jul 2004 08:57:25 +0000 (GMT) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by svr1.postgresql.org (Postfix) with ESMTP id E9B4FD1B2D9 for ; Thu, 22 Jul 2004 05:57:17 -0300 (ADT) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id i6M87jQr012455; Thu, 22 Jul 2004 11:07:45 +0300 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id i6M87i0p012451; Thu, 22 Jul 2004 11:07:45 +0300 Date: Thu, 22 Jul 2004 11:07:44 +0300 (EEST) From: Achilleus Mantzios To: cristi Cc: pgsql-sql@postgresql.org Subject: Re: connection delay In-Reply-To: <005501c46fc3$a518fa80$7202a8c0@aaa> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 200407/171 X-Sequence-Number: 18423 O kyrios cristi egrapse stis Jul 22, 2004 : > I have a client made in java who interogate postgres using jdbc driver. > If the tcp conection falls (for a few seconds) the client give an error > message about that connection. > How can I avoid this error? If its not a jdbc issue, maybe you can play with /* for a new connection */ System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); /* for already established connection */ System.setProperty("sun.net.client.defaultReadTimeout", "10000"); the interval is given in milliseconds. I have tested on FreeBSD 5.1-RELEASE-p10, 1.4.2-p5 JVM > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- -Achilleus