[英]Caused by: com.amazon.redshift.util.RedshiftException: ERROR: Query (659514) cancelled on user's request
I am trying to save data in redshift using java code through multirow insert and getting below error.我正在尝试通过多行插入使用 java 代码将数据保存在 redshift 中并出现以下错误。
Caused by: com.amazon.redshift.util.RedshiftException: ERROR: Query (659514) cancelled on user's request.
原因:com.amazon.redshift.util.RedshiftException:错误:查询(659514)已根据用户请求取消。
As per the official documentation of AWS it is mentioned根据 AWS 的官方文档,提到了
The statement_timeout value is the maximum amount of time that a query can run before Amazon Redshift terminates it.
statement_timeout 值是查询在 Amazon Redshift 终止之前可以运行的最长时间。 When a statement timeout is exceeded, then queries submitted during the session are aborted with the following error message:
当超过语句超时时,在 session 期间提交的查询将中止,并显示以下错误消息:
ERROR: Query (150) cancelled on user's request To verify whether a query was aborted because of a statement timeout, run following query:
错误:查询 (150) 已根据用户请求取消 要验证查询是否因语句超时而中止,请运行以下查询:
select * from SVL_STATEMENTTEXT where text ilike '%set%statement_timeout%to%' and pid in (select pid from STL_QUERY where query = <queryid>);
select * 来自 SVL_STATEMENTTEXT,其中文本类似于 '%set%statement_timeout%to%' 和 pid in(从 STL_QUERY 中选择 pid,其中查询 = <queryid>);
I tried to run the above query with queryid but it doesn't give any result.我尝试使用 queryid 运行上述查询,但没有给出任何结果。 Also statement timeout is 0 which turn off limitation of timeout.
语句超时也为 0,这将关闭超时限制。
what might be the problem?可能是什么问题?
Checking for statement timeouts is a good path to look down.检查语句超时是一个很好的向下看的途径。 The query you provided only looks for a statement_timeout set by the user with a SET command.
您提供的查询仅查找用户使用 SET 命令设置的 statement_timeout。 This is not the only way this parameter can be set nor is it the only timeout.
这不是设置此参数的唯一方式,也不是唯一的超时方式。 This parameter can be for all connections by a user through the ALTER USER command.
此参数可用于用户通过 ALTER USER 命令进行的所有连接。 If you think this is the parameter causing the issue you can "SET STATEMENT_TIMEOUT TO 0;"
如果您认为这是导致问题的参数,您可以“将 STATEMENT_TIMEOUT 设置为 0;” early in your session to remove this limit.
尽早在您的 session 中取消此限制。
If this doesn't fix the issue then the problem may be elsewhere.如果这不能解决问题,则问题可能出在其他地方。 WLM settings can timeout queries so check STL_WLM_RULE_ACTION system table to see if any were applied to your query.
WLM 设置可以使查询超时,因此请检查 STL_WLM_RULE_ACTION 系统表以查看是否对您的查询应用了任何设置。
Statement timeouts can also be set at the cluster level through the parameter group.还可以通过参数组在集群级别设置语句超时。 So you may want to check the parameter group for a statement_timeout setting.
因此,您可能需要检查参数组中的 statement_timeout 设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.