task_cancelled_exception: task_cancelled_exception: Task was cancelled / TaskCancelledException
ElasticsearchWhat does it mean?
A running task (search, _reindex, _update_by_query, etc.) was cancelled. Cancellation can happen by a user request to _tasks/_cancel, by the client closing the HTTP connection (client timeout/abort; Elasticsearch cancels the associated search automatically), or by cancellation of a parent task or an expired async search.
Why does it happen?
The user cancelled the task with POST _tasks/<task_id>/_cancel (X-Opaque-Id only identifies and helps find the task; it does not cancel it), a client timeout dropped the connection, long-running expensive queries, or adaptive resource management stopped a heavy task.
How to fix it
If the task was cancelled unexpectedly, review client timeout and connection settings; optimize the heavy query (less data, more specific filters). For long operations, run _reindex/_update_by_query asynchronously (wait_for_completion=false) and monitor with GET _tasks. View active tasks: GET _tasks?detailed=true. If needed, split expensive queries or use scroll/PIT.
More from this engine
- master_not_discovered_exceptionmaster_not_discovered_exception / MasterNotDiscoveredException
- security_exceptionsecurity_exception: unable to authenticate / action [...] is unauthorized for user [...] (HTTP 401/403)
- validation_exceptionvalidation_exception / illegal_argument_exception: Validation Failed: ...
- action_request_validation_exceptionaction_request_validation_exception
- index_closed_exceptionindex_closed_exception
- unavailable_shards_exceptionunavailable_shards_exception
- query_shard_exceptionquery_shard_exception