agentultra / postgresql-replicant

A streaming PostgreSQL logical replication client library for Haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postgres will kill idle connections

agentultra opened this issue · comments

The postgres server will terminate idle connections:

2021-02-15 21:40:18.193 EST [15869] jking@hackday LOG:  terminating walsender process due to replication timeout

It sends a message in the replication stream and then terminates within approximately a second. The client should probably respond to this.

I added TCP keep-alive support using the [keep-alive](2021-02-15 21:40:18.193 EST [15869] jking@hackday LOG: terminating walsender process due to replication timeout) library but it doesn't appear to help, maybe it's misconfigured?

Fixed by #8