[FAQ] dm v1.x 同步报错: Could not read data from vccx.t_business_register_info: Query execution was interrupted, maximum statement execution time exceeded

[问题描述]

syncer 阶段, dm 同步报错:

[2020/06/08 23:35:57.280 +08:00] [INFO] [mydumper.go:158] [“Thread 1 shutting down”] [task=task_yhzx_vccx] [unit=dump] [2020/06/08 23:35:59.099 +08:00] [INFO] [mydumper.go:158] [“Thread 2 shutting down”] [task=task_yhzx_vccx] [unit=dump] [2020/06/08 23:35:59.585 +08:00] [ERROR] [mydumper.go:164] [“Could not read data from vccx.t_business_register_info: Query execution was interrupted, maximum statement execution time exceeded”] [task=task_yhzx_vccx] [unit=dump] [2020/06/08 23:35:59.585 +08:00] [INFO] [mydumper.go:158] [“Thread 4 shutting down”] [task=task_yhzx_vccx] [unit=dump] [2020/06/08 23:35:59.586 +08:00] [INFO] [mydumper.go:158] [“Finished dump at: 2020-06-08 23:35:59”] [task=task_yhzx_vccx] [unit=dump] [2020/06/08 23:35:59.588 +08:00] [INFO] [mydumper.go:114] [“dump data finished”] [task=task_yhzx_vccx] [unit=dump] [“cost time”=3m2.506006271s] [2020/06/08 23:35:59.588 +08:00] [INFO] [subtask.go:266] [“unit process returned”] [subtask=task_yhzx_vccx] [unit=Dump] [stage=Paused] [status={}] [2020/06/08 23:35:59.588 +08:00] [ERROR] [subtask.go:285] [“unit process error”] [subtask=task_yhzx_vccx] [unit=Dump] [“error information”="{“msg”:"[code=32001:class=dump-unit:scope=internal:level=high] mydumper runs with error: exit status 1. \n\n"}"]

[解决方案]

  • 调整 mysql 参数 max_execution_time .
    • show variables like ‘max_execution_time’;