ProxySQL 故障

Stella981
• 阅读 1067

发现直接连接MGR节点是正常的,可以写入,但通过ProxySQL连接就无法show\select\insert 等 使用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)
点赞
收藏
评论区
推荐文章
待兔 待兔
4个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Stella981 Stella981
3年前
Linux系统性能测试工具(四)——CPU性能测试工具之super_pi、sysbench
本文介绍关于Linux系统(适用于centos/ubuntu等)的CPU性能测试工具sysbench。CPU性能测试工具包括:super\_pi;sysbench——不仅可以测试C
Stella981 Stella981
3年前
ProxySQL官档翻译__12_ProxySQL配置之ProxySQL_Cluster
12\_ProxySQL配置之ProxySQL\_Cluster备注:文章编写时间201904201905期间,后续官方在github的更新没有被写入~~注意:ProxySQL群集实现可能会发生变化,因为roadmap(设计规划图)中的所有功能尚未实现。
Stella981 Stella981
3年前
ProxySQL的趣味杂谈
主题:ProxySQL 趣味杂谈大纲:1、充哥,上一次重庆站分享之后可以说好评如潮,那么这次分享会有什么不一样的地方呢?2、对很多同学来说,他们很关心用上Proxy以后数据库性能损失的问题,充哥有这方面的经验吗?3、充哥也是ProxySQL的老司机了,可以讲讲之前用Pro
Stella981 Stella981
3年前
ProxySQL Cluster 概述
导读作者:张灿(邮箱:1920153783@qq.com,欢迎交流)知数堂MySQLDBA班第9期学员1:前言在ProxySQL1.4.2之前,ProxySQL单点的解决方法有配合keepalived使用来实现ProxySQL的主备,但是需要在主备上配置两份完全相同的路由或规则,如果再
Wesley13 Wesley13
3年前
mysql中间件
一.分类为:负载均衡类和数据切分类1.负载均衡中间件提供了请求的转发,降低了单节点的负载,如haproxy,mysqlproxy,mysqlrouter2.数据切分中间件按照不同的路由算法分发sql语句就形成了数据切分,如mycat,atlas,oneproxy,proxysql1.mycatA.开源免费
Stella981 Stella981
3年前
ProxySQL新版本对MGR的原生支持
导读译者:张锐志(微信号:516160507),知数堂第10期MySQL学员原文出处:http://lefred.be/content/mysqlgroupreplicationnativesupportinproxysql/原文作者:lefred
Stella981 Stella981
3年前
ProxySQL使用
ProxySQL特点QuerycachingQueryRoutingSupportsfailoverAdvancedconfigurationwith0downtimeApplicationlayerproxyCrossplatformAdvancedtop
Stella981 Stella981
3年前
Google地球出现“无法连接到登录服务器(错误代码:c00a0194)”解决方法
Google地球出现“无法连接到登录服务器(错误代码:c00a0194)”解决方法参考文章:(1)Google地球出现“无法连接到登录服务器(错误代码:c00a0194)”解决方法(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fwww.codeprj.com%2Fblo
Wesley13 Wesley13
3年前
MySQL ProxySql 由于漏洞扫描导致的 PROXYSQL CPU 超高
!(https://oscimg.oschina.net/oscnet/263ba261140b4e2d8b1e1aa3d6f19f32.png)ProxySQL本身是一款非常棒的MYSQL中间件的开源产品,在公司运行了一段时间后,突然一天报警,所在机器的CPU出奇的高,之前在测试系统,预生产,以及生产系统均没有出现问题.开始未