Re: pg_basebackup fails: could not receive data from WAL stream: serverclosed the connection unexpectedly - Mailing list pgsql-admin

From AYahorau@ibagroup.eu
Subject Re: pg_basebackup fails: could not receive data from WAL stream: serverclosed the connection unexpectedly
Date
Msg-id OFC1163B79.B53CCAF0-ON4325835A.0048A3DA-4325835A.00497566@iba.by
Whole thread Raw
In response to Re: pg_basebackup fails: could not receive data from WAL stream:server closed the connection unexpectedly  (Stephen Frost <sfrost@snowman.net>)
List pgsql-admin
Thanks for the suggestion.

I understand that wal_sender_timeout should be increased. Experience  has shown that for status-interval=1s it is necessary to configure wal_sender_timeout to 15 seconds.


Nevertheless I found out that if I call
pg_basebackup -h host01 -U dbuser  -D /var/PostgresDb   --wal-method=fetch -w
(using fetch method instead of default stream method),

pg_basebackup completes successfully.

Best regards,
Andrei



From:        Stephen Frost <sfrost@snowman.net>
To:        AYahorau@ibagroup.eu,
Cc:        MikalaiKeida@ibagroup.eu, pgsql-admin <pgsql-admin@postgresql.org>, Shreeyansh Dba <shreeyansh2014@gmail.com>
Date:        04/12/2018 18:38
Subject:        Re: pg_basebackup fails: could not receive data from WAL stream: server closed the connection unexpectedly




Greetings,

* AYahorau@ibagroup.eu (AYahorau@ibagroup.eu) wrote:
> Is there any relation/dependency between status-interval  and
> wal_sender_timeot.?

Yes, if pg_basebackup doesn't ping the server with a status interval
within wal_sender_timeout amount of time then the server is going to
think it's disappeared.

> I  am asking this because even if I set  status-interval for pg_basebackup
> to 1 second( the most frequent feedback) I get the same error:

Sure- if they're both set to 1s, you're likely to still see the issue.
Networks take time and systems can end up being busy, so having such a
very tight timeout is, frankly, unlikely to work out all that well for
you regardless.

You could try setting wal_sender_timeout to 2s or maybe 5s and see if
that works better.

Thanks!

Stephen
[attachment "signature.asc" deleted by Andrei Yahorau/IBA]

pgsql-admin by date:

Previous
From: Shreeyansh Dba
Date:
Subject: Re: Sequences
Next
From:
Date:
Subject: DB Creations/ Drop DB :: Not working...