
# Flink写入DWS报 canceling statement due to statement timeout
#### 问题现象
Flink写入DWS报以下错误，此问题一般为SQL执行超时导致。
```
canceling statement due to statement timeout
```
#### 原因分析
DWS-Connector默认超时时间**connectionTimeOut** 为**5min**，可调大该值。
#### 处理方法
在sink表定义的with参数中增加**connectionTimeOut** 参数，单位为毫秒（ms），配置参考如下，了解更多请参见[Flink SQL作业类型](https://support.huaweicloud.com/tg-dws/dws_07_0181.html)章节。
```
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'
);
```
