Streaming replication connection break - unexpected EOF on standby connection

From: Ganesh Korde <ganeshakorde(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Streaming replication connection break - unexpected EOF on standby connection
Date: 2018-06-27 13:07:25
Message-ID: CAPNyb0WZL5aSUJNHbMPKkbn08ewOEortaVQd1urBfxoRmTSV8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
Primary_replication_user.log application/octet-stream 322.2 KB
Secondary.zip application/zip 202.6 KB

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Johannes Truschnigg 2018-06-27 13:16:52 Re: Streaming replication connection break - unexpected EOF on standby connection
Previous Message Fabio Pardi 2018-06-27 11:30:17 Re: Server Crash