influxdata/influxdb · warning · anyhow::Error

request trigger execution cancelled

Error message

request trigger execution cancelled

What it means

`execute_request_once` runs the request-path plugin under a `tokio::select!` with a cancellation token; if the cancel token fires before the plugin future completes, this error is returned and the plugin result is discarded. It signals that the HTTP request trigger run was cancelled (typically timeout or shutdown) rather than that the plugin itself failed.

Solutions

  1. Reduce plugin work or move slow external calls to async/background tasks inside the plugin.
  2. Increase the request-plugin execution timeout if one is configured for the trigger.
  3. Check server logs for shutdown/timeout around the same timestamp to identify what issued the cancellation.
  4. Make the plugin idempotent so a cancelled run can be safely retried by the caller.

Example fix

// plugin: before (blocking long call inside request trigger)
data = requests.post(HOOK_URL, json=payload, timeout=300)
// after
data = requests.post(HOOK_URL, json=payload, timeout=10)
Defensive patterns

Strategy: try-catch

Try / catch

// Caller/HTTP layer
match execute_request_once(...).await {
    Err(e) if e.to_string().contains("request trigger execution cancelled") => {
        // return 504 to client and/or retry the request trigger
    }
    other => other?,
}

Prevention

When it happens

Trigger: A request trigger (`RequestPath` spec) plugin takes longer than the configured cancellation/timeout, or the node is shutting down while the plugin is still running.

Common situations: Plugins doing slow external HTTP calls or heavy writes; deadlock in plugin code; server shutdown during in-flight webhook-triggered plugin execution.

Understand the failure class

Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/8e42e2c77d1423aa. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_processing_engine/src/worker/local.rs:532

                plugin_code_str.as_ref(),
                schema,
                query_endpoint,
                write_endpoint,
                logger,
                &trigger_arguments,
                query_params,
                headers,
                body,
                py_cache,
                plugin_root.as_deref(),
                plugin_cancel,
            )
        });

        let result = tokio::select! {
            joined = plugin => joined?,
            _ = cancel.cancelled() => {
                return Err(anyhow!("request trigger execution cancelled").into());
            }
        };

        match result {
            Ok((response_code, response_headers, response_body, plugin_return_state)) => {
                self.handle_successful_run(plugin_return_state, &run_logger, "request plugin")
                    .await;

                Ok(TriggerResponse {
                    status_code: response_code,
                    headers: response_headers,
                    body: response_body,
                })
            }
            Err(error) => Err(PluginError::PluginExecutionError(error)),
        }
    }

View on GitHub (pinned to 06200ef96b)