一次奇怪的MySQL复制故障

在异地机房部署了一个MySQL灾备库,部署之后复制看起来是正常的,但是观察MySQL错误日志却发现复制线程每隔30秒左右都会断线重连一次。
MySQL输出的错误日志:
170110 16:07:00 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
170110 16:07:00 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000362' at position 948341
170110 16:07:45 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
170110 16:07:45 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000362' at position 950196
这个故障只能在排查错误日志时发现,监控复制线程不容易检测到这个问题。
经过排查,最终发现是到机器到主力机房的路由有问题,添加路由后故障消失。

上一篇:基于新版sysbench 1.0.8压测MySQL


下一篇:Python学习笔记--在CentOS 6上升级Python至2.7版本