2

We are facing a problem where our client lets name it A. Is attempting to connect DB server (Cockroach) name B load balanced via ha-proxy

A < -- > haproxy < -- > B 

Now at every, while our client A is receiving Broken Pipe error.

But I'm not able to understand why?

Cockroach server already has the below default value i.e 60 seconds.

COCKROACH_SQL_TCP_KEEP_ALIVE ## which is enabled to send for 60 second

Plus our haproxy config has the following setting.

defaults
    mode                tcp
    # Timeout values should be configured for your specific use.
    # See: https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4-timeout%20connect
    timeout connect     10s
    timeout client      1m
    timeout server      1m
    # TCP keep-alive on client side. Server already enables them.
    option              clitcpka

option clitcpka

So what is causing the TCP connection to drop when the keepalive is enabled on every end.

Noobie
  • 461
  • 1
  • 12
  • 34

1 Answers1

1

Keepalive is what makes connections go away if one of the end points has died without closing the connection. Investigate in that direction.

The only time keepalive actually keeps the connection alive is in connection with an ill-configured firewall that drops idle connections.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263