站长网 通讯 MySQL Aborted_connects值不断增大的可能性原由分析

MySQL Aborted_connects值不断增大的可能性原由分析

这篇文章给大家介绍MySQL Aborted_connects值不断增大的可能性原因分析,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。 最近登录数据库,查看Aborted_clients的值,发现在不断增大。 mysql(mdba@localhost:test 03:36:36)show globa

这篇文章给大家介绍MySQL Aborted_connects值不断增大的可能性原因分析,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
 
最近登录数据库,查看Aborted_clients的值,发现在不断增大。
 
mysql(mdba@localhost:test 03:36:36)>show global status like 'abort%';
+——————+———+
| Variable_name    | Value   |
+——————+———+
| Aborted_clients  | 5185350 |
| Aborted_connects | 1788    |
+——————+———+
2 rows in set (0.00 sec)
 
mysql(mdba@localhost:test 03:36:37)>show global status like 'abort%';
+——————+———+
| Variable_name    | Value   |
+——————+———+
| Aborted_clients  | 5185351 |
| Aborted_connects | 1788    |
+——————+———+
2 rows in set (0.00 sec)
 
 
 
 
mysql(mdba@localhost:test 03:36:38)>show global status like 'abort%';
+——————+———+
| Variable_name    | Value   |
+——————+———+
| Aborted_clients  | 5185352 |
| Aborted_connects | 1788    |
+——————+———+
2 rows in set (0.00 sec)
 
 
 
 
mysql(mdba@localhost:test 03:36:39)>show global status like 'abort%';
+——————+———+
| Variable_name    | Value   |
+——————+———+
| Aborted_clients  | 5185355 |
| Aborted_connects | 1788    |
+——————+———+
2 rows in set (0.00 sec)
 
 
原因分析:
 
 
Aborted Clients值解释:
 
The number of connections that were aborted because the client died without closing the connection properly.
 
 
当abort clients增大的时候意味着有客户端成功建立连接,但是很快就断开连接或者被终止了,这种情况一般发生在网络不稳定的环境中。
主要的可能原因有:
 
 
  a)客户端没有主动关闭mysql连接mysql_close()。
 
 
  b)wait_timeout设置很短被mysql干掉了。
 
 
  c)客户端由于某些原因被干掉了。
 
 
Aborted Connection值解释:
 
 
The number of failed attempts to connect to the MySQL server.
 
 
当有大量的链接连接不上mysql的时候,这个数值就会激增。
主要的可能原因有:
 
 
  a)没有授权或者密码不对。一般错误日志中会有如下报错(Access denied for ‘user’@‘host’)
 
 
  b)连接数满了。一般报错包含(too many connections)
 
 
  c)超过链接时间限制,主要有这个参数控制connect_timeout(mysql默认是10s,基本除非网络环境极端不好,一般不会超时。)
 
关于MySQL Aborted_connects值不断增大的可能性原因分析就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

本文来自网络,不代表站长网立场,转载请注明出处:https://www.zwzz.com.cn/html/yidong/tx/2021/1220/39272.html

作者: dawei

【声明】:站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。
联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部