{
  "id": "kafka/disk-full-log-segment",
  "signature": "java.io.IOException: No space left on device while writing to log segment /var/lib/kafka/data/my_topic-0/00000000000000000000.log",
  "signature_zh": "磁盘空间不足异常：写入日志段 /var/lib/kafka/data/my_topic-0/00000000000000000000.log 时设备无剩余空间",
  "regex": "No space left on device while writing to log segment",
  "domain": "kafka",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Kafka broker's data directory has run out of disk space, preventing log segment writes and causing broker to become unhealthy.",
  "root_cause_type": "generic",
  "root_cause_zh": "Kafka代理的数据目录磁盘空间已满，阻止日志段写入并导致代理变得不健康。",
  "versions": [
    {
      "version": "Kafka 3.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.6.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Kafka manages segments internally; manual deletion breaks consistency.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "It may trigger aggressive cleanup but does not free space immediately if cleanup policy is not triggered.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Run `df -h /var/lib/kafka/data` to confirm disk usage, then add more disk space or move data to a larger partition. Use `log.dirs=/data/kafka` in server.properties to point to a new location.",
      "success_rate": 0.95,
      "how": "Run `df -h /var/lib/kafka/data` to confirm disk usage, then add more disk space or move data to a larger partition. Use `log.dirs=/data/kafka` in server.properties to point to a new location.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Trigger log compaction or deletion by reducing `log.retention.hours=24` or `log.retention.bytes=10737418240` (10GB) and restart broker gracefully.",
      "success_rate": 0.85,
      "how": "Trigger log compaction or deletion by reducing `log.retention.hours=24` or `log.retention.bytes=10737418240` (10GB) and restart broker gracefully.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Example: `kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name my_topic --alter --add-config retention.ms=86400000` to reduce retention to 24 hours.",
      "success_rate": 0.9,
      "how": "Example: `kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name my_topic --alter --add-config retention.ms=86400000` to reduce retention to 24 hours.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Run `df -h /var/lib/kafka/data` to confirm disk usage, then add more disk space or move data to a larger partition. Use `log.dirs=/data/kafka` in server.properties to point to a new location.",
    "Trigger log compaction or deletion by reducing `log.retention.hours=24` or `log.retention.bytes=10737418240` (10GB) and restart broker gracefully.",
    "Example: `kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --entity-name my_topic --alter --add-config retention.ms=86400000` to reduce retention to 24 hours."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kafka.apache.org/documentation/#disk_space",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-12-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}