發現直接鏈接MGR節點是正常的,能夠寫入,但經過ProxySQL鏈接就沒法show\select\insert 等 使用sysbench對ProxySQL報如下錯誤:mysql
FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_insert.lua:47: SQL error, errno = 9001, state = 'HY000': Max connect timeout reached while reaching hostgroup 10 after 10001ms FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_insert.lua:47: SQL error, errno = 9001, state = 'HY000': Max connect timeout reached while reaching hostgroup 10 after 10000ms FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_insert.lua:47: SQL error, errno = 9001, state = 'HY000': Max connect timeout reached while reaching hostgroup 10 after 10001ms FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_insert.lua:47: SQL error, errno = 9001, state = 'HY000': Max connect timeout reached while reaching hostgroup 10 after 10000ms
select * from stats_mysql_processlist;有67個sleep的命令. select * from stats_mysql_connection_pool; 10組只有一個鏈接 根據官方問題記錄,對比檢查,沒有發現問題(已經runtime\配置也是對的.)無奈重啓一次ProxySQL,OK正常了.sql
admin@127.0.0.1 [(none)]>select * from stats_mysql_processlist; +----------+-----------+------+--------------------+----------------+----------+-----------+------------+------------+----------+----------+---------+---------+------+ | ThreadID | SessionID | user | db | cli_host | cli_port | hostgroup | l_srv_host | l_srv_port | srv_host | srv_port | command | time_ms | info | +----------+-----------+------+--------------------+----------------+----------+-----------+------------+------------+----------+----------+---------+---------+------+ | 1 | 70 | wyz | information_schema | 192.168.99.185 | 41122 | 10 | | | | | Sleep | 5311426 | | | 3 | 9504 | wyz | information_schema | 192.168.99.212 | 35616 | 11 | | | | | Sleep | 24859 | | +----------+-----------+------+--------------------+----------------+----------+-----------+------------+------------+----------+----------+---------+---------+------+ 2 rows in set (0.00 sec) admin@127.0.0.1 [(none)]>select * from stats_mysql_connection_pool; Empty set (0.00 sec) admin@127.0.0.1 [(none)]>select * from stats_mysql_commands_counters where Total_cnt; +---------+---------------+-----------+-----------+-----------+---------+----------+----------+----------+-----------+-----------+--------+--------+---------+----------+ | Command | Total_Time_us | Total_cnt | cnt_100us | cnt_500us | cnt_1ms | cnt_5ms | cnt_10ms | cnt_50ms | cnt_100ms | cnt_500ms | cnt_1s | cnt_5s | cnt_10s | cnt_INFs | +---------+---------------+-----------+-----------+-----------+---------+----------+----------+----------+-----------+-----------+--------+--------+---------+----------+ | BEGIN | 6309623605 | 1583857 | 51 | 1441677 | 129945 | 11405 | 111 | 20 | 1 | 0 | 0 | 112 | 20 | 515 | | COMMIT | 1060260349 | 826562 | 4233 | 59 | 7349 | 814032 | 714 | 164 | 9 | 2 | 0 | 0 | 0 | 0 | | DELETE | 22825509825 | 1057796 | 8455 | 337172 | 227783 | 43992 | 40098 | 251246 | 115676 | 33317 | 1 | 4 | 0 | 52 | | INSERT | 179673106152 | 20885757 | 8469 | 683140 | 129291 | 19703762 | 65361 | 131523 | 2164 | 10654 | 151393 | 0 | 0 | 0 | | SELECT | 8888256088 | 22149881 | 56184 | 17273645 | 3228537 | 1588803 | 2265 | 429 | 10 | 7 | 0 | 0 | 0 | 1 | | UPDATE | 134309337044 | 3174979 | 16886 | 842234 | 547909 | 94253 | 74039 | 636912 | 572389 | 389995 | 27 | 12 | 3 | 320 | | SHOW | 6485 | 5 | 0 | 1 | 1 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +---------+---------------+-----------+-----------+-----------+---------+----------+----------+----------+-----------+-----------+--------+--------+---------+----------+ 7 rows in set (0.00 sec)