elasticsearch resource_error ai_generated true

ConcurrentSnapshotExecutionException: [my_repo:snapshot_2025] cannot create snapshot - a snapshot is already in progress for repository [my_repo]

ID: elasticsearch/snapshot-in-progress

Also available as: JSON · Markdown · 中文
83%Fix Rate
86%Confidence
1Evidence
2024-03-10First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
7.10.0 active
7.17.0 active
8.0.0 active
8.9.0 active

Root Cause

A snapshot operation is already running for the same repository, and Elasticsearch does not allow concurrent snapshots to the same repository by default.

generic

中文

同一仓库已有快照操作正在进行中,默认情况下 Elasticsearch 不允许对同一仓库执行并发快照。

Official Documentation

https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html

Workarounds

  1. 90% success Check the current snapshot status and wait for completion: GET _snapshot/my_repo/_current
    Check the current snapshot status and wait for completion: GET _snapshot/my_repo/_current
  2. 85% success Abort the running snapshot gracefully: POST _snapshot/my_repo/snapshot_name/_cancel
    Abort the running snapshot gracefully: POST _snapshot/my_repo/snapshot_name/_cancel
  3. 75% success Increase the snapshot timeout to allow longer operations: PUT _cluster/settings { "persistent": { "snapshot.max_concurrent_operations": 2 } } (requires Elasticsearch 8.0+)
    Increase the snapshot timeout to allow longer operations: PUT _cluster/settings { "persistent": { "snapshot.max_concurrent_operations": 2 } } (requires Elasticsearch 8.0+)

中文步骤

  1. Check the current snapshot status and wait for completion: GET _snapshot/my_repo/_current
  2. Abort the running snapshot gracefully: POST _snapshot/my_repo/snapshot_name/_cancel
  3. Increase the snapshot timeout to allow longer operations: PUT _cluster/settings { "persistent": { "snapshot.max_concurrent_operations": 2 } } (requires Elasticsearch 8.0+)

Dead Ends

Common approaches that don't work:

  1. 80% fail

    Deleting an in-progress snapshot may cause repository corruption or leave partial data. It is not recommended.

  2. 95% fail

    Snapshot state is persisted in the repository metadata, not just memory. Restarting nodes does not release the lock.

  3. 60% fail

    This does not resolve the conflict for the original repository; it only creates a workaround that may not be feasible for production.