Streaming replication connection break - unexpected EOF on standby connection - Mailing list pgsql-admin

From Ganesh Korde
Subject Streaming replication connection break - unexpected EOF on standby connection
Date
Msg-id CAPNyb0WZL5aSUJNHbMPKkbn08ewOEortaVQd1urBfxoRmTSV8g@mail.gmail.com
Whole thread Raw
Responses Re: Streaming replication connection break - unexpected EOF onstandby connection  (Johannes Truschnigg <johannes@truschnigg.info>)
List pgsql-admin
Hi,

  We are using PostgreSQL 10.1 and OS is Ubuntu 16.04.3 LTS, for primary as well as secondary database server.

We are using streaming replication (asynchronous). But there is frequent replication connection break between primary and secondary.

Database Log at Primary:

14:46:11.610  IST LOG:  unexpected EOF on standby connection
14:46:11.610  IST LOG:  disconnection: session time: 2:59:34.520 user=replication_user

Database Log at Secondary

14:46:38.822 IST FATAL:  terminating walreceiver due to timeout

After replication disconnection, secondary get connected after approximately 25 seconds. We want to set synchronous replication, but because of this issue we can't do that.

I have enabled debug5 log, but I didn't understand much from that. I am attaching the same.

Below are the config parameter

Primary

wal_level = replica
max_wal_senders = 10     
                         
wal_keep_segments = 300  
wal_sender_timeout = 60s 

checkpoint_timeout = 5min
max_wal_size = 1GB
min_wal_size = 80MB


Secondary

hot_standby = on
wal_receiver_timeout = 30s

Below are the issues.

1. Because of what reason, " unexpected EOF on standby connection" occurs on primary db server?
2. After replication disconnection, secondary should immediately connect to primary, but it takes some time, what could be the reason for this?

Any help will be highly appreciated.

Thanks & Regards,
Ganesh.
Attachment

pgsql-admin by date:

Previous
From: Fabio Pardi
Date:
Subject: Re: Server Crash
Next
From: Johannes Truschnigg
Date:
Subject: Re: Streaming replication connection break - unexpected EOF onstandby connection