X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 93154D1B563 for ; Tue, 28 Oct 2003 15:56:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 15365-02 for ; Tue, 28 Oct 2003 11:56:04 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 97D9DD1B51B for ; Tue, 28 Oct 2003 11:55:59 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9SFtsit022558; Tue, 28 Oct 2003 10:55:54 -0500 (EST) To: "Lemasson Sylvain" Cc: pgsql-jdbc@postgresql.org Subject: Re: Connection time out In-reply-to: <001901c39d5e$ca5a2d60$221e210a@PCJ1> References: <003301c39d2e$35500940$221e210a@PCJ1> <20031028112302.A32750@bacon> <001901c39d5e$ca5a2d60$221e210a@PCJ1> Comments: In-reply-to "Lemasson Sylvain" message dated "Tue, 28 Oct 2003 15:21:33 +0100" Date: Tue, 28 Oct 2003 10:55:53 -0500 Message-ID: <22557.1067356553@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/111 X-Sequence-Number: 8541 "Lemasson Sylvain" writes: > Thank you for your reply thomas, but the setLoginTimout concernes the time a > driver wait while attempting to connect to a database. My question was about > the live time of a connection. I mean when we get a connection, postgres > reset the connection after a time out ("connection reset by peer" error > message). I can assure you that the Postgres backend will never do any such thing. Your problem must be somewhere in the communication pathway. One likely possibility is that you have an address-translating firewall (NAT box) between you and the database server. NAT boxes will commonly forget about connections that have been idle for too long. It may not be possible to persuade the firewall not to do this --- if you cannot bypass the firewall, your best bet may be to issue an empty query every so often to keep the connection alive. regards, tom lane