You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, while testing the new fixes on PR 3515, I've noticed a couple of issues: Scenario 1
Removed .db files and then restarting proxysql (loads config from /etc/proxysql.cnf, starting fresh)
mysql_servers configuration matches initial configuration(HG0 = instance-1, HG0 = both instance-1 and instance-0). runtime_mysql_servers matches. All 3 server entries appear ONLINE in running config.
Tested running SELECTS using this:
while true; do mysql -h127.0.0.1 -P6033 -uweb_test -ptest-e "select @@hostname"; done
This keeps producing the same result:
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
And this in log file:
2021-07-12 19:04:22 MySQL_Session.cpp:4269:handler(): [WARNING] Killing connection instance-1.ZZZZ.ca-central-1.rds.amazonaws.com:3306 because query 'select @@hostname' from client '127.0.0.1':36014 timed out.
2021-07-12 19:04:22 MySQL_Session.cpp:143:kill_query_thread(): [WARNING] KILL QUERY 15553 on instance-1.ZZZZ.ca-central-1.rds.amazonaws.com:3306
2021-07-12 19:04:23 [INFO] Killing query 6068
2021-07-12 19:04:23 mysql_connection.cpp:1027:handler(): [ERROR] Connect timeout on instance-1.ZZZZ.ca-central-1.rds.amazonaws.com:3306 : exceeded by 0us
2021-07-12 19:04:23 [INFO] Killing query 6072
2021-07-12 19:04:23 [INFO] Killing query 6077
2021-07-12 19:04:23 mysql_connection.cpp:1027:handler(): [ERROR] Connect timeout on instance-1.ZZZZ.ca-central-1.rds.amazonaws.com:3306 : exceeded by 0us
Looks like it refuses to use instance-1(current writer) as reader.
Do a failover (let instance-0 be the new writer). runtime_mysql_servers successfully picks up the change. mysql_servers and runtime_mysql_servers table is now different (as expected). HG-1-instance-1 is SHUNNED for a second but then all server entries are ONLINE.
Run the select test again, result:
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-2-114 |
+-----------------+
Proxysql successfully uses both instances for reads.
Restart proxysql. runtime_mysql_servers is still the same and is still mismatching mysql_servers (as expected).
Now proxysql is refusing to use instance-0 as reader.
Failover again and it starts using both instances for reading (until I restart proxysql process again)
Scenario 2
Same first step as above, purge db and restart proxysql so it picks up fresh config.
Run same select test as above, confirm that we still see only 1 server in HG-1 serving selects:
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
2021-07-12 19:29:59 MySQL_Monitor.cpp:4294:monitor_AWS_Aurora_thread_HG(): [ERROR] Error on AWS Aurora check for new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com:3306 after 10ms. Unable to create a connection. If the server is overload, increase mysql-monitor_connect_timeout. Error: timeout or error in creating new connection: Can't connect to MySQL server on 'new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com' (115).
2021-07-12 19:29:59 MySQL_Monitor.cpp:4294:monitor_AWS_Aurora_thread_HG(): [ERROR] Error on AWS Aurora check for new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com:3306 after 1ms. Unable to create a connection. If the server is overload, increase mysql-monitor_connect_timeout. Error: timeout or error in creating new connection: Can't connect to MySQL server on 'new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com' (115).
2021-07-12 19:29:59 MySQL_Monitor.cpp:4294:monitor_AWS_Aurora_thread_HG(): [ERROR] Error on AWS Aurora check for new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com:3306 after 1ms. Unable to create a connection. If the server is overload, increase mysql-monitor_connect_timeout. Error: timeout or error in creating new connection: Can't connect to MySQL server on 'new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com' (115).
It's using new-reader and instance-1 as readers, but not the writer.
Afterwards, if I get rid of new-reader by shutting it down/removing:
Keep the Select test running while new-reader is being shut down
new-reader is SHUNNED in runtime_mysql_servers but proxysql is still trying to access it?
2021-07-12 20:08:23 MySQL_Monitor.cpp:4294:monitor_AWS_Aurora_thread_HG(): [ERROR] Error on AWS Aurora check for new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com:3306 after 2ms. Unable to create a connection. If the server is overload, increase mysql-monitor_connect_timeout. Error: timeout or error in creating new connection: Unknown MySQL server host 'new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com' (-2).
2021-07-12 20:08:23 MySQL_Monitor.cpp:4294:monitor_AWS_Aurora_thread_HG(): [ERROR] Error on AWS Aurora check for new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com:3306 after 2ms. Unable to create a connection. If the server is overload, increase mysql-monitor_connect_timeout. Error: timeout or error in creating new connection: Unknown MySQL server host 'new-reader.celzqyystx3l.ca-central-1.rds.amazonaws.com' (-2).
#3515
ec2 ubuntu 20
ProxySQL version 2.2.0-106-gdc22217
aurora mysql 2.10.0
instance-1 = original writer (ip-172-16-0-243)
instance-0 = original reader (ip-172-16-2-114)
new-reader = additional reader (ip-172-16-3-30)
Hello, while testing the new fixes on PR 3515, I've noticed a couple of issues:
Scenario 1
while true; do mysql -h127.0.0.1 -P6033 -uweb_test -ptest-e "select @@hostname"; done
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
And this in log file:
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-2-114 |
+-----------------+
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-2-114 |
+-----------------+
Scenario 2
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
mysql> select * from runtime_mysql_servers;
+--------------+-------------------------------------------------------------------------------------------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname | port | gtid_port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+-------------------------------------------------------------------------------------------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| 0 | instance-1.ZZZZ.ca-central-1.rds.amazonaws.com | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 1 | new-reader.ZZZZ.ca-central-1.rds.amazonaws.com| 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 1 | instance-0.ZZZZ.ca-central-1.rds.amazonaws.com | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
| 1 | instance-1.ZZZZ.ca-central-1.rds.amazonaws.com | 3306 | 0 | ONLINE | 1000 | 0 | 1000 | 0 | 0 | 0 | |
+--------------+-------------------------------------------------------------------------------------------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
Log entry while it's still being added:
+----------------+
| @@hostname |
+----------------+
| ip-172-16-3-30 |
+----------------+
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-0-243 |
+-----------------+
+----------------+
| @@hostname |
+----------------+
| ip-172-16-3-30 |
+----------------+
+----------------+
| @@hostname |
+----------------+
| ip-172-16-3-30 |
+----------------+
+-----------------+
| @@hostname |
+-----------------+
| ip-172-16-2-114 |
+-----------------+
+----------------+
| @@hostname |
+----------------+
| ip-172-16-3-30 |
+----------------+
Afterwards, if I get rid of new-reader by shutting it down/removing:
Please let me know if you need any additional information and I will be happy to provide it.
The text was updated successfully, but these errors were encountered: