DM 同步 MySQL 报错:batch write rows reach max retry 3 and still failed

【 TiDB 使用环境】测试
【 TiDB 版本】v7.5.0
【复现路径】使用 DM 从 MySQL 8.0.33 全量同步数据到 TiDB v7.5.0
【遇到的问题:问题现象及影响】
全量同步过程中遇到报错:

            "subTaskStatus": [
                {
                    "name": "mes",
                    "stage": "Paused",
                    "unit": "Load",
                    "result": {
                        "isCanceled": false,
                        "errors": [
                            {
                                "ErrCode": 34019,
                                "ErrClass": "load-unit",
                                "ErrScope": "internal",
                                "ErrLevel": "high",
                                "Message": "",
                                "RawCause": "[Lightning:Restore:ErrRestoreTable]restore table `_mes_wafer_package`.`_ori_atw_new` failed: [`_mes_wafer_package`.`_ori_atw_new`] batch write rows reach max retry 3 and still failed: dial tcp 10.207.69.77:4000: connect: connection refused",
                                "Workaround": ""
                            }

目前参考下面这个问答在上游 MySQL 设置了参数 max_allowed_packet 为 1G

## 在 MySQL 上游执行
SET GLOBAL max_allowed_packet = 1073741824;

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

resume-task 或者 stop-task && start-task 依然报错,这个是什么原因?

set config ‘10.192.1.109:20160’ raftstore.raft-entry-max-size=‘16MiB’;
修改这个参数试试

edit-confg
tikv:
log.file.max-days: 7
log.file.max-size: 100
readpool.coprocessor.use-unified-pool: true
readpool.storage.use-unified-pool: false
storage.block-cache.capacity: 28991029248 好像是这个参数,要不就是上面那个参数

1 个赞

调整参数:

tidb:
    performance.txn-entry-size-limit: 16777216
    performance.txn-total-size-limit: 1073741824
  tikv:
    raftstore.raft-entry-max-size: 25165824
	storage.block-cache.capacity: 8589934592

现在可以正常同步。

此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。