-
Notifications
You must be signed in to change notification settings - Fork 982
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
Help in configuring ProxySQL for MySQL HA #959
Comments
Hi. |
Please find the log in the attachment. |
@govindarajan : from the log, I assume I think the issue you are seeing is caused by some misconfiguration in your new master.
ProxySQL is disabling the server because it has "replication lag" (details soon).
Note that this behavior is expected and generally correct. |
I tested multiple times with mysql-monitor_replication_lag_interval = 1000.
I even run slave reset all manually in the new master. Event then the server status still continuing in SHUNNED_REPLICATION_LAG. When I do load mysql servers to runtime, server status becoming online immediately. Similarly If I change the read_only field, that time also server status is becoming online. Edit:
|
@govindarajan : can you please share the new error log and point at what time exactly the failover happens? Also, when you say :
Do you refer to the status in Finally and most important: are you only checking the status of one of the tables above, or also sending traffic? If you are sending traffic, does the traffic hang because it cannot find the master? Thanks |
I am referring to stats_mysql_connection_pool table. I checked the status of mysql_servers table and in that server status was ONLINE. When I send read(select) traffic, it is working fine. Because one node in the reader hostgroup is online. But when I sent write traffic, it is failing with ERROR 9001 (HY000): Max connect timeout reached while reaching hostgroup 0 after 10000ms. I have attached the log for both working and non-working case.
Unexpected behaviour settings:
expected_behaviour_proxysql.txt |
I haven't reproduced it yet, but the fact you reported different behavior based on different interval made me suspect a race condition. |
If a slave was shunned because replication was broken, when it becomes a master it was staying shunned
@govindarajan , can you please compile branch v1.3.5-dev ? |
I am using Centos 7. If you are able to compile it for me, that will be great. Will check and let you know. |
Tested and issue is resolved. Thanks for fixing this. |
Great! |
If a slave was shunned because replication was broken, when it becomes a master it was staying shunned
Hi René,
Thanks for the brilliant work.
I am trying to setup Highly available MySQL using ProxySQL. For that I have Master M and Replica R1 and R2. I am using query rules to route traffic to read slave((R1, R2) as well.
My configuration as follows.
Since I want to use replica node also for reading, I am using max_replication_lag option to 1 second. So that application wont read stale data. I have also setup MHA to automatic failover. When I bring down M, R1 is getting promoted as master. read_only field is getting set correctly. But R1 is in SHUNNED_REPLICATION_LAG state.
Thats because we have set max_replication_lag initially. Since this is the only node which is there in writer_host_group, can we make it not use replication_lag? Or is there any workaround? Or Am I doing something wrong? Can you please point me to the correct direction?
The text was updated successfully, but these errors were encountered: