From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mladen Marinović <mladen.marinovic@kset.org>
Cc: pgsql-general@postgresql.org
Subject: Re: pg_basebackup connection closed unexpectedly...
Date: Wed, 12 Feb 2020 10:09:01 -0500
Message-ID: <23480.1581520141@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHjkqPQo2jGPds2AMOqr0_t9dvpvCbWXJYqDqYCtum_cqrL98g@mail.gmail.com>
References: <CAHjkqPQo2jGPds2AMOqr0_t9dvpvCbWXJYqDqYCtum_cqrL98g@mail.gmail.com>
=?UTF-8?Q?Mladen_Marinovi=C4=87?= <mladen.marinovic@kset.org> writes:
> Recently I am having some strange problems with pg_basebackup. About once a
> week the backup process ends with an error message like this:
> 2020-02-11 23:25:40 UTC [25790]: [1-1] user=replicator,db=[unknown] LOG:
> could not send data to client: Connection reset by peer
Hmmm ....
> The problem started occurring after a hardware (RAM + SSD) upgrade and an
> OS Upgrade to Ubuntu 18.04. Both the server and backup process run in
> separate docker containers on the same machine. This happens randomly on
> multiple servers with the same configuration and it is probably not
> hardware related. Also, this happens evenly on 9.4 and 9.6, and using the
> same docker images that worked flawlessly on the previous installation.
> I have been investigating the issue for at least a month and found no
> problems in any log or metric before or after the event. I suspect that
> this is related to some OS/docker parameter that is not well configured.
How long does the backup run before failing? If the connection were going
between different machines my suspicions would lean toward a network
timeout. That seems somewhat unlikely in this configuration, but you
never know.
> Would increasing the database log level give me any more info about what
> caused the connection to close?
Nope, not directly. It might be useful to figure out whether data
transfer continues full throttle right up until the connection drop,
or whether it stops sooner (and then there's some sort of timeout
before the error occurs).
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, mladen.marinovic@kset.org
Subject: Re: pg_basebackup connection closed unexpectedly...
In-Reply-To: <23480.1581520141@sss.pgh.pa.us>
References: <CAHjkqPQo2jGPds2AMOqr0_t9dvpvCbWXJYqDqYCtum_cqrL98g@mail.gmail.com> <23480.1581520141@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