文档首页/ 数据仓库服务 DWS/ 故障排除/ DWS-Connector类/ Flink写入DWS报 canceling statement due to statement timeout
更新时间:2025-10-25 GMT+08:00

Flink写入DWS报 canceling statement due to statement timeout

问题现象

Flink写入DWS报以下错误,此问题一般为SQL执行超时导致。

canceling statement due to statement timeout

原因分析

DWS-Connector默认超时时间connectionTimeOut5min,可调大该值。

处理方法

在sink表定义的with参数中增加connectionTimeOut参数,单位为毫秒(ms),配置参考如下,了解更多请参见Flink SQL作业类型章节。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
create table dwsSink (
  attr_name attr_type 
  (',' attr_name attr_type)* 
  (','PRIMARY KEY (attr_name, ...) NOT ENFORCED)
)
with (
  'connector' = 'dws',
  'url' = '',
  'tableName' = '',
  'username' = '',
  'password' = '',
  'connectionTimeOut' = '600000'
);