首页 > 数据库 >MySQL Error_code: 1756

MySQL Error_code: 1756

时间:2024-04-24 18:44:05浏览次数:20  
标签:code slave max set Error jobs 1756 pending size

电话告警故障:MySQL 从库异常宕机。

查看MySQL error日志:

[ERROR] Slave SQL for channel '': ... The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state. A restart should restore 
consistency automatically, although using non-transactional storage for data or info tables or DDL queries could lead to problems. In such cases you have to examine
your data (see documentation for details). Error_code: 1756

官网解释:

Waiting for Slave Workers to free pending events
This waiting action occurs when the total size of events being processed by Workers exceeds the size of theslave_pending_jobs_size_max system variable. The 
Coordinator resumes scheduling when the size drops below this limit. This state occurs only when slave_parallel_workers is set greater than 0. 意思如下: 这个等待状态会在什么时候发生呢?这个状态只会在slave_parallel_workers设置不为0时,当Workers处理的事件总大小超过了系统参数slave_pending_jobs_size_max设置的值。 当大小低于这个值时,调度器才会恢复调度。

查看数据库参数大小:slave_pending_jobs_size_max 默认值为16MB

mysql> show variables like 'slave_pending_jobs_size_max';
+-----------------------------+----------+
| Variable_name               | Value    |
+-----------------------------+----------+
| slave_pending_jobs_size_max | 16777216 |
+-----------------------------+----------+
1 row in set (0.00 sec)

mysql> set global slave_pending_jobs_size_max = 134217728;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like 'max_allowed_packet';
+--------------------+------------+
| Variable_name      | Value      |
+--------------------+------------+
| max_allowed_packet | 573741824  |
+--------------------+------------+
1 row in set (0.00 sec)

mysql> set global max_allowed_packet = 1073741824;
Query OK, 0 rows affected (0.00 sec)

最后将 slave_pending_jobs_size_max = 128M 写进配置文件中.

标签:code,slave,max,set,Error,jobs,1756,pending,size
From: https://www.cnblogs.com/hankyoon/p/18156089

相关文章

  • CodeForces 115D Unambiguous Arithmetic Expression
    洛谷传送门CF传送门直接区间dp可以做到\(O(n^3)\),卡常可过,在此就不赘述了。为了方便先把连续的数字缩成一段。我们考虑直接从前往后扫,扫的过程中dp。设\(f_{i,j}\)为考虑了\([1,i]\),还有\(j\)个没配对的左括号的方案数。但是我们发现我们不知道一个数字前要添加几......
  • window下使用vscode和mingw搭建cpp开发环境
    window下使用vscode和mingw搭建cpp开发环境1.下载安装MinGWMinGW是一款在Windows平台上运行的GNU工具集,它提供了一套构建应用程序的开发工具,包括GNUC/C++编译器、GDB调试器、GNU二进制工具等。它可以用于开发Windows应用程序,也可以用于开发跨平台的应用程序。MinGW的全称是Mi......
  • godot4.2 vscode配置
    launch.json文件{//使用IntelliSense了解相关属性。//悬停以查看现有属性的描述。//欲了解更多信息,请访问:https://go.microsoft.com/fwlink/?linkid=830387"version":"0.2.0","configurations":[{"name":......
  • 如何在 VSCode 中配置和编写 LINGO
    目录如何在VSCode中配置和编写LINGO安装VSCode扩展LINGO脚本文件与runlingo命令LINGO命令行交互和脚本文件配置VisualStdioCode的设置配置LTF文件的代码高亮关于文件兼容的一些小问题如何在VSCode中配置和编写LINGOLINGO是用来解决优化问题的一个特别好用的......
  • 使用VS Code和WSL开发C/C++的简单配置
    使用VSCode和WSL开发C/C++的简单配置目录使用VSCode和WSL开发C/C++的简单配置使用情形VSCodeDebug简要介绍由于微软文档写的非常详细,感觉没什么写的必要了,后续只贴参数和链接了task配置launch配置C/C++配置参考来源使用情形TheWindowsSubsystemforLinux适用于Linux的W......
  • 解决 java 实体中用 LocalDateTime 在转换时候报错 Error attempting to get column
    java中的实体类用到了LocalDateTime类型。在转换时候报错Errorattemptingtogetcolumn‘XXX’fromresultset.Cause:java.sql.解决方法最为简单。是因为com.alibaba的版本问题。切换版本号到1.1.22即可消除问题<dependency><groupId>com.alibaba</gro......
  • VS Code如何创建HTML文件并运行(新手友好)
    一、下载VSCode首先从官网https://code.visualstudio.com/下载VSCode。二、在VSCode中下载相关的插件1、首先打开VisualStudioCode 2、点击左侧工具栏中“扩展”栏,也可使用扩展快捷键打开(Ctrl+Shift+X),打开扩展下载以下三个插件。(三个插件安装完成后都需要重启VSCod......
  • vscode 提示导入的第三方包 路径不正确 ,要怎么解决?
    问题:vscode提示导入的第三方包路径不正确,如:import{Modal}from"node_modules/antd/lib/index";应该是import{Modal}from"antd";要怎么解决?回答要让VSCode在自动导入时不使用node_modules的完整路径,可按以下步骤操作:打开VSCode进入设置页面,你可以通过顶部菜......
  • Codeforces Round 940 (Div. 2) and CodeCraft-23
    A.Stickogon#include<bits/stdc++.h>usingnamespacestd;usingi32=int32_t;usingi64=longlong;#defineinti64usingvi=vector<int>;constintN=3e5,mod=1e9+7;voidsolve(){ vicnt(101); intn; cin>>n; for(i......
  • Codeforces Round 892 (Div. 2) 复盘
    A没啥好说的。B也是,很简单的贪心。但是AB都因为读题导致的理解误差wa了一发。哎,读题读错,只能说英语还得练。C,赛时没做出来,后面的也是。这个题目其实思路已经有了,cf的这种题,还放在C题,那就是很明显那种能打标看出规律的东西。就算知道了是打表能看出来的,我懒得写暴力,所以就一直......