Re: Connection time out - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Connection time out
Date
Msg-id 22557.1067356553@sss.pgh.pa.us
Whole thread Raw
In response to Re: Connection time out  ("Lemasson Sylvain" <s.lemasson@mak-system.net>)
List pgsql-jdbc
"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

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Connection time out
Next
From: "Blankz-Boy"
Date:
Subject: Re: Unable to run Applets with appletviewer