Long running update by query task
An update-by-query task has exceeded your configured runtime threshold. Update by query scrolls matching documents and reindexes each updated copy in place, which can take a long time on large indices.
For a complete list of insights, refer to AutoOps insights.
| Field | Value |
|---|---|
| Component | Elasticsearch |
| Severity | Medium |
| Scope | Node |
| Domains | performance, indexing, stability, tasks |
You can customize these settings to adjust when AutoOps detects this event and presents the insight. Refer to AutoOps event settings for details.
The default customization settings are:
| Setting | Type | Default |
|---|---|---|
| Long running update by query task threshold in minutes | Integer | 60 |
The following is an example of what you might see when this insight is triggered. Real insights use live data and links from your deployment or cluster.
There are 3 tasks that ran more than the 12 minutes threshold.
The longest task running start time was 2026-03-15T14:22:00 UTC time.
The longest task running time is 48 minutes.
AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.
Improve long update-by-query tasks
Condition: Shown when update-by-query tasks are not cancellable.
Use slicing to parallelize the task, narrow the query with filters to match fewer documents, and temporarily raise or turn off the refresh interval during the run. Review index mappings and analysis for optimization opportunities.
Update by query modifies documents that match a query by scrolling the index and reindexing each matched document with the requested changes. Like other scroll-based tasks, it keeps search contexts in memory until the job finishes, and each batch extends the scroll keep-alive window.
Large match sets, mapping changes that force reindexing of many fields, and multiple concurrent update-by-query tasks add CPU, heap, and I/O pressure. The work is sometimes intentional for in-place schema changes, but extended runtime during peak traffic can affect search and indexing performance.