Hello everyone,
I have following problem wit haproxy and Galera Cluster. The problem is with Prepared Statements, I think the
reference of the connections is wrong which goes to the nodes.
Error is like Unknown prepared statement handler (1163087433) given to mysqld_stmt_execute in
/opt/online/classes/db/dbTemplate/impl/mysqli/MysqliTemplate.php (205)
Is there a solution?
Use everyone Galera load balancer (GLB) with Prepared Statement is there the same problem?
my haproxy configuration
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 1024
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
defaults
log global
mode http
option tcplog
option dontlognull
retries 3
option redispatch
maxconn 1024
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
balance leastconn
listen galera_cluster 192.168.13.141:3306
mode tcp
option tcpka
option httpchk
server production.cluster-log-1 192.168.13.144:3306
server production.cluster-log-2 192.168.13.145:3306
server production.cluster-log-3 192.168.13.146:3306
Thanks
That explains it.
Makes sense. It of course takes some resources for HAProxy to maintain
state for peristed connections. But it's really needed so worth
turning it on!
Those of you maintaining HAProxy scripts for Galera usage (Percona!)
may want to make this a default option in your configs.