pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Lemasson Sylvain <s.lemasson@mak-system.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Connection time out
Date: Tue, 28 Oct 2003 10:55:53 -0500
Message-ID: <22557.1067356553@sss.pgh.pa.us> (raw)
In-Reply-To: <001901c39d5e$ca5a2d60$221e210a@PCJ1>
References: <003301c39d2e$35500940$221e210a@PCJ1>
	<20031028112302.A32750@bacon>
	<001901c39d5e$ca5a2d60$221e210a@PCJ1>

"Lemasson Sylvain" <s.lemasson@mak-system.net> 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



view thread (8+ messages)  latest in thread

Message-ID: <22557.1067356553@sss.pgh.pa.us>
Permalink:  ../22557.1067356553@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22557.1067356553@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, s.lemasson@mak-system.net
  Subject: Re: Connection time out
  In-Reply-To: <22557.1067356553@sss.pgh.pa.us>
  References: <003301c39d2e$35500940$221e210a@PCJ1> <20031028112302.A32750@bacon> <001901c39d5e$ca5a2d60$221e210a@PCJ1> <22557.1067356553@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox