网站首页 > 博客文章 正文
问题背景
MySQL 从库报错如下:
错误信息如下:
...
Last_Errno:1317
Last_Error:Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction 'a838ba08-c009-11e9-85e1-fa163ea2992d:31622919405' at master log master-bin.005599, end_log_pos 2297. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
...
Last_SQL_Errno:1317
Last_SQL_Error:Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction 'a838ba08-c009-11e9-85e1-fa163ea2992d:31622919405' at master log master-bin.005599, end_log_pos 2297. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
排查方式
1. 首先我们先通过 performance_schema 查看一下造成报错的原因
mysql> select * from performance_schema.replication_applier_status_by_worker;
从这里报错看到,某条语句在回放的时候查询执行被中断了。
2. 然后我们再查看 MySQL 的 error-log
日志中也提示了我们,因为工作线程被断开,查询中断,它在当前这个位置点停止了,如果想要恢复重新启动主从即可。
3. 尝试重新启动主从
mysql> stop slave;
mysql> start slave;
重启复制通道后,复制确实正常了,接下来需要知道为什么查询被中断了。
4. 带着疑问,去看了下在报错的这个时间里 MySQL 或是服务器做了什么,然后发现了这个时间 MySQL 在做备份,之后查看 xtrabackup 备份参数是带着 --kill-long-queries-timeout=60 和 --kill-long-query-type=all。
简单来说就是,当 --kill-long-query-type=all,--kill-long-queries-timeout=60,从开始执行 FLUSH TABLES WITH READ LOCK 到 kill 掉阻塞它的这些查询之间等待的秒数为 60 秒,默认值为 0,不会 kill 任何查询,使用这个选项 xtrabackup 需要有 Process 和 super 权限。
5. 然后查看 xtrabackup 的备份日志,一切答案见了分晓。
猜你喜欢
- 2024-09-23 MySQL最重要的日志-binlog详解(mysqlbinlog日志内容)
- 2024-09-23 mysql 错误:packets out of order.
- 2024-09-23 MySQL 性能优化:8 种常见 SQL 错误用法
- 2024-09-23 常见的 MySQL 异常及处理方法(mysql故障处理)
- 2024-09-23 详解蓝鲸部署常见报错及解决方案汇总
- 2024-09-23 MySQL数据库“十宗罪”【十大经典错误案例】
- 2024-09-23 MySQL 面试选择题15道(答案解释)(mysql面试题及答案整理)
- 2024-09-23 mysql1366错误:字符集冲突导致插入数据异常,解决方案
- 2024-09-23 mysql使用过程的错误记录(五)(mysql常见错误)
- 2024-09-23 mysql 使用过程的错误记录(一)(mysql语句错误)
你 发表评论:
欢迎- 07-02在线学习在爱奇艺信息流推荐业务中的探索与实践
- 07-02Diallyl Trisulfide(H2S donor)二烯丙基三硫:合成方法与工艺
- 07-02MitoSOX Red Mitochondrial Superoxide Indicator使用方法
- 07-02深度时空网络、记忆网络与特征表达学习在 CTR 预估中的应用
- 07-02iFluor 488标记鬼笔环肽可通过标记F-actin,研究细胞在迁移等
- 07-02快速了解红色线粒体超氧化物荧光探针的基本特性
- 07-02腔肠素400A(Coelenteramine 400a)综合解析,一文掌握所有要点!
- 07-02Chinese doctor Zhang Junqiao's heroic act exemplifies deep China-Africa friendship: FM spokesperson
- 最近发表
-
- 在线学习在爱奇艺信息流推荐业务中的探索与实践
- Diallyl Trisulfide(H2S donor)二烯丙基三硫:合成方法与工艺
- MitoSOX Red Mitochondrial Superoxide Indicator使用方法
- 深度时空网络、记忆网络与特征表达学习在 CTR 预估中的应用
- iFluor 488标记鬼笔环肽可通过标记F-actin,研究细胞在迁移等
- 快速了解红色线粒体超氧化物荧光探针的基本特性
- 腔肠素400A(Coelenteramine 400a)综合解析,一文掌握所有要点!
- Chinese doctor Zhang Junqiao's heroic act exemplifies deep China-Africa friendship: FM spokesperson
- 用Python写了一个上课点名系统(附源码)(自制考勤系统)
- Kubernetes中的PV、PVC、Configmap介绍
- 标签列表
-
- ifneq (61)
- messagesource (56)
- aspose.pdf破解版 (56)
- promise.race (63)
- 2019cad序列号和密钥激活码 (62)
- window.performance (66)
- qt删除文件夹 (72)
- mysqlcaching_sha2_password (64)
- ubuntu升级gcc (58)
- nacos启动失败 (64)
- ssh-add (70)
- jwt漏洞 (58)
- macos14下载 (58)
- yarnnode (62)
- abstractqueuedsynchronizer (64)
- source~/.bashrc没有那个文件或目录 (65)
- springboot整合activiti工作流 (70)
- jmeter插件下载 (61)
- 抓包分析 (60)
- idea创建mavenweb项目 (65)
- vue回到顶部 (57)
- qcombobox样式表 (68)
- vue数组concat (56)
- tomcatundertow (58)
- pastemac (61)
本文暂时没有评论,来添加一个吧(●'◡'●)