• Mysql IO异常记录


    故障记录

    监控显示磁盘IO异常,客户方断断续续接收到磁盘告警,如下:

    我方:增加监控显示如下:

    并且当出现IO问题时,执行lsof | grep deleted,可见:

    已确定,由于数据库问题,而导致磁盘IO异常。

    临时处理,将mysql的临时目录路径修改到大的空间去:

    参考地址:https://cloud.tencent.com/developer/article/1506494

    修改下mysql的tmpdir目录.

    [mysqld]

    tmpdir = /utry/data

    然后启动mysql即可

    当出现IO异常时,显示如下,并可见目录路径已修改到/utry/data

    解决办法:

    开启mysql慢日志.

    [mysqld]

    slow_query_log = ON

    slow_query_log_file = /utry/mysql/data/slow.log

    long_query_time = 1

    查看日志,对慢日志进行分析。查找到信息如下:

    # Time: 2021-03-11T03:41:00.398273Z

    # Time: 2021-03-11T03:41:00.398273Z

    # User@Host: root[root] @ [10.0.0.1] Id: 2163

    # Query_time: 385.629880 Lock_time: 0.000674 Rows_sent: 10 Rows_examined: 5705690

    use ccdb;

    SET timestamp=1615434060;

    SELECT

    CDRS.ANSWER_STAMP AS answerStamp,

    CDRS.END_STAMP AS endStamp,

    CDRS.START_STAMP AS startStamp,

    CDRS.BILLSEC AS billsec,

    CDRS.CALL_ID AS callId,

    CDRS.CALLER_ID_NUMBER AS callerIdNumber,

    CDRS.CALL_ID AS callId,

    CDRS.CALLER_ID_NUMBER AS callerIdNumber,

    CDRS.CONTEXT AS context,

    CDRS.DESTINATION_NUMBER AS destinationNumber,

    CDRS.DIRECTION AS direction,

    CDRS.DURATION AS duration,

    CDRS.HANGUP_CAUSE AS hangupCause,

    CDRS.LOCAL_IP_V4 AS localIpV4,

    READ_CODEC AS readCodec,

    CDRS.ROUTE AS route,

    CDRS.ROUTE_IP AS routeIp,

    CDRS.UUID AS uuid,

    CDRS.WRITE_CODEC AS writeCodec,

    CDRS.VLAN_ID AS vlanId,

    RECORD_CDRS.FULL_RECORD_PATH AS recordPath

    FROM

    CDRS LEFT JOIN record_cdrs ON CDRS.uuid=record_cdrs.uuid

     

     

    ORDER BY

    startStamp desc

     

     

    LIMIT 0,10;

    解决办法:

    确定升级时间,添加索引。

    作者:岁月星空
    出处:https://www.cnblogs.com/syxk
    ^_^如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,您的“推荐” 将是我最大的写作动力^_^。
    本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。
  • 相关阅读:
    洛谷P2805 植物大战僵尸
    洛谷P4307 球队收益
    bzoj4842 Delight for a Cat
    洛谷P2053 修车
    bzoj2561 最小生成树
    bzoj3114 LCM Pair Sum
    洛谷P4486 Kakuro
    bzoj3698 XWW的难题
    关于oracle数据库
    toString方法的用法
  • 原文地址:https://www.cnblogs.com/SyXk/p/14537299.html
Copyright © 2020-2023  润新知