zoukankan      html  css  js  c++  java
  • ProxySQL 故障

    发现直接连接MGR节点是正常的,可以写入,但通过ProxySQL连接就无法showselectinsert 等
    使用sysbench对ProxySQL报以下错误:

    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正常了.

    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)
    
    
    
  • 相关阅读:
    FreeSWITCH第三方库(视频)的简单介绍(二)
    FreeSWITCH第三方库(音频)的简单介绍(一)
    libreoffice实现WORD文档转PDF文档
    Linux TOP命令详解
    java内存泄漏
    FreeSWITCH的传真发送
    CPU的一些参数和排名
    设计模式(九)访问者模式
    设计模式(八)状态模式
    使用PermissionsDispatcher轻松解决Android权限问题
  • 原文地址:https://www.cnblogs.com/2woods/p/9534545.html
Copyright © 2011-2022 走看看