My normal config of haproxy is:
defaults
log global
mode http
option tcplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
##### MYSQL-CL #####
listen MYSQL-CL
bind 10.17.1.65:3306
mode tcp
option mysql-check user haproxy_check
balance roundrobin
server MYSQL-01 10.17.1.66:3306 check
server MYSQL-02 10.17.1.67:3306 check backup
timeout server 20000
timeout client 150000
timeout connect 40000
And this configuration working properly! Completly no issue.
But i want do properly config using Frontend and Backend so i create configuration like this:
defaults
log global
mode http
option tcplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
frontend MYSQL-CL
bind 10.17.1.65:3306
mode tcp
timeout client 150000
maxconn 1000
default_backend MYSQL-CL
backend MYSQL-CL
fullconn 1000
balance roundrobin
option mysql-check user haproxy_check
server MYSQL-01 10.17.1.66:3306 check inter 4000 fall 3 maxconn 1000
server MYSQL-02 10.17.1.67:3306 check backup inter 4000 fall 3 maxconn 1000
timeout server 20000
timeout connect 40000
But when i use this configuration i get:
2021-10-18 7:10:11 17039399 [Warning] Aborted connection 17039399 to db: 'wordpress' user: 'wordpress' host: 'haproxy01' (Got an error reading communication packets)
Anyone know what is wrong? timeouts looks OK this is not issue with MariaDB because working on old config so this is something wrong with haproxy config but i have no idea what is wrong....
I read many comments but ppl say about timeouts or DB issue... but looks like this is something other.