﻿---
title: Long running reindex task
description: Describes what AutoOps detects and surfaces with the Long running reindex task insight: A reindex task has exceeded your configured runtime threshold.
url: https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch/long_running_reindex_task
products:
  - Elastic Cloud Enterprise
  - Elastic Cloud Hosted
  - Elastic Cloud on Kubernetes
  - Elasticsearch
applies_to:
  - Elastic Cloud Hosted: Generally available
  - Elastic Cloud on Kubernetes: Generally available
  - Elastic Cloud Enterprise: Generally available
  - Self-managed Elastic deployments: Generally available
---

# Long running reindex task
A reindex task has exceeded your configured runtime threshold. Reindex reads source documents through scroll contexts and writes them to a destination index, which can take hours on large indices.
<note>
  For a complete list of insights, refer to [AutoOps insights](https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch).
</note>


## Insight details


| Field     | Value                                   |
|-----------|-----------------------------------------|
| Component | Elasticsearch                           |
| Severity  | Medium                                  |
| Scope     | Node                                    |
| Domains   | performance, indexing, stability, tasks |


## Customization settings

You can customize these settings to adjust when AutoOps detects this event and presents the insight. Refer to [AutoOps event settings](https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/monitor/autoops/ec-autoops-event-settings) for details.
The default customization settings are:

| Setting                                        | Type    | Default |
|------------------------------------------------|---------|---------|
| Long running reindex task threshold in minutes | Integer | `60`    |


## Example: What you might see in AutoOps

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.

### Long running reindex task


#### What was detected

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.

#### Recommendations

<note>
  AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.
</note>

<dropdown title="Improve long reindex tasks">
  **Condition**: Shown when reindex tasks are not cancellable.Use slicing to parallelize reindexing (not supported for remote clusters), temporarily raise or turn off the refresh interval during the run, and review index mappings and analysis for optimization opportunities.
</dropdown>


#### Background and impact

Reindex copies documents from a source index to a destination index using scroll contexts that stay open until the task completes. Each batch refreshes the scroll keep-alive window, so a reindex can run far longer than the default scroll timeout while holding memory for search contexts.
Large source indices, wide queries, and several reindex tasks running together increase heap use and load on indexing and search thread pools. Long reindexes are sometimes expected, but sustained overlap with production traffic can slow searches and writes on affected nodes.

## Guide

[Reindex indices examples](https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/elasticsearch/rest-apis/reindex-indices)