Dataphin集成任务同步报错:"com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request"
更新时间:
问题描述
Dataphin集成任务同步报错:"com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request"。
2022-04-08 09:25:48.950 [0-0-0-reader] ERROR CommonRdbmsReader$Task - error occurred when reading.
com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1401) ~[mysql-connector-java-5.1.47.jar:5.1.47]
at com.alibaba.datax.plugin.rdbms.util.DBUtil.query(DBUtil.java:583) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.util.DBUtil.query(DBUtil.java:570) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.util.DBUtil.query(DBUtil.java:549) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.reader.CommonRdbmsReader$Task.startRead(CommonRdbmsReader.java:224) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.reader.mysqlreader.MysqlReader$Task.startRead(MysqlReader.java:83) [mysqlreader-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.dt.dlink.core.trans.adaptor.engine.ReaderRunnerAdaptor.run(ReaderRunnerAdaptor.java:57) [dlink-engine-0.0.1-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:882) [na:1.8.0_152]
问题原因
读取SQL执行超时导致的。
解决方案
在JDBC连接参数里加上超时时间(queryTimeout=*****)时间适当增大即可。
适用于
- Dataphin 独立部署3.3
文档内容是否对您有帮助?