From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rob Sargent <robjsargent@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: tcp settings
Date: Wed, 21 Sep 2022 00:03:06 -0400
Message-ID: <971597.1663732986@sss.pgh.pa.us> (raw)
In-Reply-To: <DBC0441E-3313-4FEF-AA5D-E66E531F5ED7@gmail.com>
References: <934612.1663716103@sss.pgh.pa.us>
<DBC0441E-3313-4FEF-AA5D-E66E531F5ED7@gmail.com>
Rob Sargent <robjsargent@gmail.com> writes:
>> then keepalives aren't necessarily the solution anyway. When is
>> this failure occurring ... is it while trying to establish the
>> database connection in the first place? Or does it only happen
>> if you've left the psql session sit idle for a long while?
> Sitting idle for not even a long while. Under half hour I feel would do it. But I don’t think it times out while I’m “SQLing”
OK, that does sound like something that reducing the keepalive
interval could help with. The traditional keepalive timeout
is a couple of hours, at least on my Linux box:
$ cat /proc/sys/net/ipv4/tcp_keepalive_time
7200
but it sounds like there's something between you and the database
server that will forget connections a lot quicker than that.
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, robjsargent@gmail.com
Subject: Re: tcp settings
In-Reply-To: <971597.1663732986@sss.pgh.pa.us>
References: <934612.1663716103@sss.pgh.pa.us> <DBC0441E-3313-4FEF-AA5D-E66E531F5ED7@gmail.com> <971597.1663732986@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