Redshift intermittent error "Query cancelled on user's request"

We have a very annoying redshift error on Knime analytics or Knime server, it appears intermittently and on larger workflows where there are a number of DB Data nodes joined to create a SQL script. It can happen on any of the in-database processing nodes (e.g DB groupby, DB SQL…).

Amazon Invalid operation: Query cancelled on user’s request;

When researching the error itself it gives reference to a max timeout option. If this is true how do we ammend that?
We’re using knime 4.2x until we upgrade the server and move to 4.3, possibly already a fix in that version?

Hi @DXRX,

can you post the full error here?

The Query (150) canceled on user's request failure might be raised by the statement timeout that can be set on a query level or using the cluster parameter group.

Hi Sascha,
Thanks for the reply, we have the statement_timeout set to 0 to turn off this limitation. Looking at the redshift query logs it’s telling us the query has been aborted. Below is the error log

Knime returned the follow error: Failure, workflow was not executed, current state is IDLE.
DB Joiner 174:1176: Execute failed: Amazon Invalid operation: Query cancelled on user’s request;
Full response: {‘json-output-30’: [[{‘data_pr_id’: ‘277fef80feb89d6ed55f9be660266220’, ‘step_end_timestamp’: ‘2021-01-24T20:22:43’, ‘step_start_timestamp’: ‘2021-01-24T20:17:58’}], [{’_error_stacktrace’: “java.lang.Exception: Failure, workflow was not executed, current state is IDLE.\nDB Joiner 174:1176: Execute failed: Amazon Invalid operation: Query cancelled on user’s request;\n\tat org.knime.productivity.callworkflow.table.CallWorkflowTableNodeModel.executeInternal(CallWorkflowTableNodeModel.java:132)\n\tat org.knime.productivity.callworkflow.table.CallWorkflowTableNodeModel.access$0(CallWorkflowTableNodeModel.java:112)\n\tat org.knime.productivity.callworkflow.table.CallWorkflowTableNodeModel$1.call(CallWorkflowTableNodeModel.java:99)\n\tat org.knime.productivity.callworkflow.table.CallWorkflowTableNodeModel$1.call(CallWorkflowTableNodeModel.java:1)\n\tat org.knime.core.util.ThreadPool.runInvisible(ThreadPool.java:615)\n\tat org.knime.productivity.callworkflow.table.CallWorkflowTableNodeModel.execute(CallWorkflowTableNodeModel.java:96)\n\tat org.knime.core.node.NodeModel.executeModel(NodeModel.java:576)\n\tat org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1236)\n\tat org.knime.core.node.Node.execute(Node.java:1016)\n\tat org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:558)\n\tat org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)\n\tat org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)\n\tat org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)\n\tat org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)\n\tat org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)\n\tat org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)\n”, ‘_error_reason’: “Failure, workflow was not executed, current state is IDLE.\nDB Joiner 174:1176: Execute failed: Amazon Invalid operation: Query cancelled on user’s request;”, ‘_error_node’: ‘Call Workflow (Table Based)’, ‘_error_caught’: 1}]]}

Hello DXRX,
when a KNIME database node is executing it has no internal timeout or something that would trigger the query cancellation. The execution is only canceled by KNIME if the user himself explicitly cancels the node execution. So I guess it is a Amazon Redshift or driver related setting that causes the query cancelation. Did you also increase WLM max execution time as described here.
Bye
Tobias

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.