MySQLAborted_connects值不断增大的可能性原因分析-创新互联

这篇文章给大家介绍MySQL Aborted_connects值不断增大的可能性原因分析,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

创新互联致力于互联网品牌建设与网络营销,包括成都网站设计、成都做网站、SEO优化、网络推广、整站优化营销策划推广、电子商务、移动互联网营销等。创新互联为不同类型的客户提供良好的互联网应用定制及解决方案,创新互联核心团队十年专注互联网开发,积累了丰富的网站经验,为广大企业客户提供一站式企业网站建设服务,在网站建设行业内树立了良好口碑。

最近登录数据库,查看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值不断增大的可能性原因分析就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


新闻标题:MySQLAborted_connects值不断增大的可能性原因分析-创新互联
URL分享:http://ybzwz.com/article/iesgh.html