From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ninad Shah <nshah.postgres@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Issue with pg_basebackup v.11
Date: Fri, 22 Oct 2021 12:09:55 -0400
Message-ID: <2715482.1634918995@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOFEiBc21S_CBaw4qHB5S-j3ty00CV21T8SMt8SvYFKEJnFDVA@mail.gmail.com>
References: <CAOFEiBc21S_CBaw4qHB5S-j3ty00CV21T8SMt8SvYFKEJnFDVA@mail.gmail.com>
Ninad Shah <nshah.postgres@gmail.com> writes:
> What I observed is that it takes a couple of hours between below 2 lines.
> 115454656/1304172127 kB (8%), 0/1 tablespace
> (...atastaging/base/115868/154220.2)
> pgbasebackup: could not read COPY data: could not receive data from server:
> Connection timed out
We have heard reports of network connections dropping while pg_basebackup
is busy doing something disk-intensive such as fsync'ing. The apparent
2-hour delay here does not mean that pg_basebackup was out to lunch for
2 hours; more likely that reflects the TCP timeout delay before the kernel
realizes that the connection is lost. The actual blame probably resides
with some firewall or router that has a short timeout for idle
connections.
I'd try turning on fairly aggressive TCP keepalive settings for the
connection, say keepalives_idle=30 or so.
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, nshah.postgres@gmail.com
Subject: Re: Issue with pg_basebackup v.11
In-Reply-To: <2715482.1634918995@sss.pgh.pa.us>
References: <CAOFEiBc21S_CBaw4qHB5S-j3ty00CV21T8SMt8SvYFKEJnFDVA@mail.gmail.com> <2715482.1634918995@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