Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra 0.1sec sleep to handle http-check issue in HAProxy 2.2 #164

Closed
wants to merge 1 commit into from

Conversation

pkaroluk
Copy link

In HAProxy 2.2.x there is a problem to check cluster state using http-check due Recv failure
The same issue was described few years ago olafz/percona-clustercheck#2

@fraenki fraenki self-assigned this Aug 25, 2020
@fraenki
Copy link
Member

fraenki commented Aug 25, 2020

In HAProxy 2.2.x there is a problem to check cluster state using http-check due Recv failure

Do you think this issue is specific to HAProxy version 2.2, or does this affect other versions of HAProxy too?
The referenced issue predates HAProxy 2.2.

Furthermore I'm also using HAProxy with percona-clustercheck and haven't experienced this issue. Could you share the relevant parts of your haproxy.conf for comparison?

@pkaroluk
Copy link
Author

pkaroluk commented Aug 26, 2020

I've been using HAProxy for many years, the config was fine with 1.8, 2.0, 2.1. Only 2.2 is affected. Probably it's the result of huge improvements in checks area.

HAProxy 2.1 cfg:

listen tcp_mysql_cluster
  bind 0.0.0.0:3306 
  mode tcp
  balance roundrobin
  default-server check port 9200 inter 2000 rise 2 fall 5 on-marked-down shutdown-sessions
  option httpchk
  option dontlog-normal
  timeout connect 5s
  timeout server 120s
  timeout client 3600s
  server db1.example.com db1.example.com:3306
  server db2.example.com db2.example.com:3306
  server db3.example.com db3.example.com:3306

And the config of HAProxy 2.2:

listen tcp_mysql_cluster
  bind 0.0.0.0:3306 
  mode tcp
  balance roundrobin
  default-server check inter 2000 rise 2 fall 5 on-marked-down shutdown-sessions
  option httpchk
  option dontlog-normal
  timeout connect 5s
  timeout server 120s
  timeout client 3600s
  http-check connect port 9200
  http-check send meth GET uri /
  http-check expect status 200
  server db1.example.com db1.example.com:3306
  server db2.example.com db2.example.com:3306
  server db3.example.com db3.example.com:3306

@fraenki
Copy link
Member

fraenki commented Jun 27, 2022

I haven't seen this issue when using HAProxy 2.2 and I'm not aware of any reports about this issue, so I'm closing this PR now.

@fraenki fraenki closed this Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants