Mysql 错误日志的found a zombie dump thread with the same UUID. Master is killing the zombie dump thread错误

线上数据库服务出现大量'found a zombie dump thread with the same UUID'错误日志,该问题由'slave_net_timeout'和'MASTER_HEARTBEAT_PERIOD'参数引起。当MASTER_HEARTBEAT_PERIOD小于slave_net_timeout且主库无二进制日志时,导致从库重连。解决方案是将MASTER_HEARTBEAT_PERIOD设为slave_net_timeout的一半,或保持默认值。
部署运行你感兴趣的模型镜像

         线上某台数据库服务起的日志量比较大,发现大量如下日志:

2020-06-12T11:07:43.855027+08:00 31628085 [Note] Start asynchronous binlog_dump to slave (server_id: 1628551066), pos(, 4)
2020-06-12T13:36:13.982917+08:00 31634106 [Note] While initializing dump thread for slave with UUID <cdd1d2c1-aa15-11ea-b8b4-fa160e9d2062>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread(31628085).
2020-06-12T13:36:13.983021+08:00 31634106 [Note] Start binlog_dump to master_thread_id(31634106) slave_server(1628551066), pos(, 4)
2020-06-12T13:36:13.983032+08:00 31634106 [Note] Start asynchronous binlog_dump to slave (server_id: 1628551066), pos(, 4)
2020-06-12T13:36:13.983098+08:00 31628085 [Note] Stop asynchronous binlog_dump to slave (server_id: 1628551066)
2020-06-12T15:53:14.110616+08:00 31639663 [Note] While initializing dump thread for slave with UUID <cdd1d2c1-aa15-11ea-b8b4-fa160e9d2062>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread(31634106).
2020-06-12T15:53:14.110791+08:00 31639663 [Note] Start binlog_dump to master_thread_id(31639663) slave_server(1628551066), pos(, 4)
2020-06-12T15:53:14.110803+08:00 31639663 [Note] Start asynchronous binlog_dump to slave (server_id: 1628551066), pos(, 4)
 

该问题,主要由以下一下2个参数引发:

1、slave_net_timeout

表示slave在slave_net_timeout时间之内没有收到master的任何数据(包括binlog,heartbeat),slave认为连接断开,会进行重连。

2、MASTER_HEARTBEAT_PERIOD 代表主库 没有二进制日志发送的时候,给从库发送心跳包的时间间隔。

当MASTER_HEARTBEAT_PERIOD<slave_net_timeout 时,并且主库没有二进制日志产的时候,会引发上面的问。

当然这个问题本身问题不大,但是可以避免的时候,我们需要尽量避免。

MASTER_HEARTBEAT_PERIOD 的设置方法,设置master_heartbeat_period 为slave_net_timeout 的一半即可。

mysql> stop slave;
mysql> change master to master_heartbeat_period = 10;
mysql> start slave;

 

另外,默认master_heartbeat_period 的值为slave_net_timeout 的一半,可以不用设置。

您可能感兴趣的与本文相关的镜像

Langchain-Chatchat

Langchain-Chatchat

AI应用
Langchain

Langchain-Chatchat 是一个基于 ChatGLM 等大语言模型和 Langchain 应用框架实现的开源项目,旨在构建一个可以离线部署的本地知识库问答系统。它通过检索增强生成 (RAG) 的方法,让用户能够以自然语言与本地文件、数据库或搜索引擎进行交互,并支持多种大模型和向量数据库的集成,以及提供 WebUI 和 API 服务

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值