From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Willy-Bas Loos <willybas@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: tcp keepalives not sent during long query
Date: Wed, 14 Dec 2022 10:52:35 +0100
Message-ID: <c5ab4fc032e99d6aa8a982adc77c245fbd5a9ccc.camel@cybertec.at> (raw)
In-Reply-To: <CAHnozTjKVdc1yHsAaboLR=3hT32sLTO+jQQzhgL3siF4XqXf+g@mail.gmail.com>
References: <CAHnozTjKVdc1yHsAaboLR=3hT32sLTO+jQQzhgL3siF4XqXf+g@mail.gmail.com>
On Wed, 2022-12-14 at 08:55 +0100, Willy-Bas Loos wrote:
> Some users of our database have a NAT firewall and keep a postgres client (e.g. pgAdmin )
> open for hours. To prevent the connection from being killed by the firewall due to inactivity,
> we configured tcp_keepalives_idle = 120 so that the server sends keepalives and keeps the
> connection active. (this is on debian)
>
> We've recently upgraded from postgres 9.3 to 13 and from debian 6 to 11.
> I'm getting the complaint that since the upgrade, the connection breaks. But only when they run a long query.
>
> Has anything changed in postgres that might cause this? e.g. that keepalives are only sent when the session is idle?
It is the operating system kernel that sends keepalives, so that should be independent of
what the PostgreSQL backend is doing.
Yours,
Laurenz Albe
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: laurenz.albe@cybertec.at, willybas@gmail.com
Subject: Re: tcp keepalives not sent during long query
In-Reply-To: <c5ab4fc032e99d6aa8a982adc77c245fbd5a9ccc.camel@cybertec.at>
References: <CAHnozTjKVdc1yHsAaboLR=3hT32sLTO+jQQzhgL3siF4XqXf+g@mail.gmail.com> <c5ab4fc032e99d6aa8a982adc77c245fbd5a9ccc.camel@cybertec.at>
* 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