{
  "id": "elasticsearch/shard-limit-exceeded-for-node",
  "signature": "ElasticsearchException: failed to create index [logs-2025.03] - this action would add [2] shards, but this cluster currently has [1000]/[1000] maximum shards open",
  "signature_zh": "ElasticsearchException：创建索引 [logs-2025.03] 失败 - 此操作将增加 [2] 个分片，但集群当前已有 [1000]/[1000] 个最大打开分片",
  "regex": "failed to create index.*this action would add.*shards.*but this cluster currently has.*maximum shards open",
  "domain": "elasticsearch",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The cluster has reached the maximum number of shards allowed, preventing the creation of new indices.",
  "root_cause_type": "generic",
  "root_cause_zh": "集群已达到允许的最大分片数，无法创建新索引。",
  "versions": [
    {
      "version": "Elasticsearch 7.17.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Elasticsearch 8.11.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Elasticsearch 8.15.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This only delays the problem and can cause severe performance degradation because each node handles too many shards, leading to heap pressure and slow recovery.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Deleting indices may not free up shard slots if the cluster-level limit is still hit due to node distribution; also risks data loss.",
      "fail_rate": 0.45,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reduce the number of shards per index by reindexing with fewer primary shards. For example, use `POST /_reindex` with a target index that has 1 primary shard instead of 5: `{\"source\": {\"index\": \"logs-2025.03\"}, \"dest\": {\"index\": \"logs-2025.03-compact\", \"number_of_shards\": 1}}`",
      "success_rate": 0.85,
      "how": "Reduce the number of shards per index by reindexing with fewer primary shards. For example, use `POST /_reindex` with a target index that has 1 primary shard instead of 5: `{\"source\": {\"index\": \"logs-2025.03\"}, \"dest\": {\"index\": \"logs-2025.03-compact\", \"number_of_shards\": 1}}`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase `cluster.max_shards_per_node` cautiously after auditing shard distribution. Run `GET _cluster/settings` to check current limit, then set via `PUT _cluster/settings` with `{\"persistent\": {\"cluster.max_shards_per_node\": 1500}}`. Ensure enough heap per node.",
      "success_rate": 0.72,
      "how": "Increase `cluster.max_shards_per_node` cautiously after auditing shard distribution. Run `GET _cluster/settings` to check current limit, then set via `PUT _cluster/settings` with `{\"persistent\": {\"cluster.max_shards_per_node\": 1500}}`. Ensure enough heap per node.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Reduce the number of shards per index by reindexing with fewer primary shards. For example, use `POST /_reindex` with a target index that has 1 primary shard instead of 5: `{\"source\": {\"index\": \"logs-2025.03\"}, \"dest\": {\"index\": \"logs-2025.03-compact\", \"number_of_shards\": 1}}`",
    "Increase `cluster.max_shards_per_node` cautiously after auditing shard distribution. Run `GET _cluster/settings` to check current limit, then set via `PUT _cluster/settings` with `{\"persistent\": {\"cluster.max_shards_per_node\": 1500}}`. Ensure enough heap per node."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/misc-cluster-settings.html#cluster-max-shards-per-node",
  "official_doc_section": null,
  "error_code": "shard_limit_exceeded",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2024-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}