{
  "id": "elasticsearch/field-cache-eviction-out-of-memory",
  "signature": "OutOfMemoryError: Java heap space (field cache eviction)",
  "signature_zh": "内存溢出：Java堆空间（字段缓存逐出）",
  "regex": "OutOfMemoryError: Java heap space",
  "domain": "elasticsearch",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The field data cache or filter cache consumes too much heap memory, and eviction triggers an OOM because the JVM cannot free enough space.",
  "root_cause_type": "generic",
  "root_cause_zh": "字段数据缓存或过滤器缓存消耗过多堆内存，逐出操作导致 JVM 无法释放足够空间而触发内存溢出。",
  "versions": [
    {
      "version": "7.10.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "8.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "8.12.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Larger heap only delays the OOM; the field cache can still grow unbounded and eventually exhaust memory.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling the cache causes severe performance degradation for aggregations and sorting on text fields, leading to query failures.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reduce the field data cache size in elasticsearch.yml: indices.fielddata.cache.size: 20% of heap. Restart the node for the change to take effect.",
      "success_rate": 0.85,
      "how": "Reduce the field data cache size in elasticsearch.yml: indices.fielddata.cache.size: 20% of heap. Restart the node for the change to take effect.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Enable the fielddata circuit breaker with a lower limit: PUT /_cluster/settings { \"persistent\": { \"indices.breaker.fielddata.limit\": \"30%\" } }",
      "success_rate": 0.8,
      "how": "Enable the fielddata circuit breaker with a lower limit: PUT /_cluster/settings { \"persistent\": { \"indices.breaker.fielddata.limit\": \"30%\" } }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 elasticsearch.yml 中减少字段数据缓存大小：indices.fielddata.cache.size: 20% of heap。重启节点使更改生效。",
    "启用字段数据断路器并设置较低限制：PUT /_cluster/settings { \"persistent\": { \"indices.breaker.fielddata.limit\": \"30%\" } }"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/circuit-breaker.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2023-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}