DBAtlas · Database operations atlas

Reallocate shards that hit the retry limit (reroute retry_failed)

ElasticsearchCluster/Node

Command

# Attempt count and last failure details:
GET _cluster/allocation/explain?filter_path=index,shard,unassigned_info.reason,unassigned_info.failed_allocation_attempts,unassigned_info.details,allocate_explanation
# After fixing the cause, retry shards that hit the limit:
POST _cluster/reroute?retry_failed=true&metric=none
# Recovery progress:
GET _cat/recovery?v&active_only=true&h=index,shard,stage,source_node,target_node,bytes_percent,translog_ops_percent

What it does

Shows failure details for shards whose allocation was stopped after consecutive failures (ALLOCATION_FAILED, max_retry) and triggers allocation again; monitors recovery progress.

When to use it

When allocation explain shows 'shard has exceeded the maximum number of retries'; after a full disk, corrupt translog or transient network problem has been resolved.

Caution

Running retry_failed without fixing the cause makes the shard try 5 more times and fail again; resolve the error in unassigned_info.details first. If many shards enter recovery at once, network and disk load rises; it is limited by cluster.routing.allocation.node_concurrent_recoveries and indices.recovery.max_bytes_per_sec.

Open in DBAtlas →

Related