Re: Connection time out

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lemasson Sylvain" <s(dot)lemasson(at)mak-system(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection time out
Date: 2003-10-28 15:55:53
Message-ID: 22557.1067356553@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Lemasson Sylvain" <s(dot)lemasson(at)mak-system(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message THIAGARAJAN Venkatesh 2003-10-29 05:50:50 I want to download mysql driver
Previous Message Dave Cramer 2003-10-28 15:42:11 Re: Connection time out