• ADADADADAD

    MySQL Aborted_connects值不断增大的可能性原因分析[ mysql数据库 ]

    mysql数据库 时间:2024-11-26 22:11:43

    作者:文/会员上传

    简介:

    最近登录数据库,查看Aborted_clients的值,发现在不断增大。mysql(mdba@localhost:test 03:36:36)>show global status like 'abort%';+------------------+---------+

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    最近登录数据库,查看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值不断增大的可能性原因分析.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: Abortedconnectsmysql