Barbara Stephenson wrote:
Hello,
We have a website that connects remotely to our 8.3 postgres
database. I've noticed if I connect to the database and let it sit
for an hour the connection is lost. Is there a default connection
timeout?
How "remote"? Through firewalls/VPNs/etc.? My suspicion is that an
intervening portion of the network is dropping the connection. You could
start by analyzing your network. Alternately, the following portion of
postgresql.conf may help you (if these socket options are implemented on
your system).
# - TCP Keepalives -
# see 'man 7 tcp' for details
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default
I believe the default for keepalives (at least on my Linux system at the
tcp-level) is to wait 2-hours before sending keepalives. This may be
too long in your case.
Cheers,
Steve
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general