I’m having a repeating issue that meets me every few month.
The problem is that suddenly i see on PostgreSQL lots of “idle in transaction” for about 1 second and also, on PostgreSQL logs i get lots of “could not receive data from client: Connection reset by peer” errors.
To fix the issue i need to restart HAProxy service.
I dont understand what causing HAProxy to reset the connections.
I know that on regular times, its expected to see such error on PostgreSQL while HAProxy is the LB.
Any ideas ?
2 HAProxy (2.1.7) nodes with Keepalived
PostgreSQL managed by Patroni
Attaching my HAProxy configuration:
log 127.0.0.1 local0 info
timeout client 1m
timeout connect 2s
timeout server 1m
timeout check 2s
stats uri /
option httpchk OPTIONS /master
http-check expect status 200
server PostgreSQL01 PostgreSQL01:5432 check port 8008
server PostgreSQL02 PostgreSQL02:5432 check port 8008