{
  "id": "aws/ecs-task-stopped-cannotstartcontainererror",
  "signature": "STOPPED (CannotStartContainerError: API error (500): devmapper: Thin pool has X free data blocks which is less than the minimum required X total data blocks)",
  "signature_zh": "已停止（CannotStartContainerError：API 错误 (500)：devmapper：精简池有 X 个空闲数据块，少于所需的最小 X 个总数据块）",
  "regex": "CannotStartContainerError.*devmapper.*Thin pool has \\d+ free data blocks which is less than the minimum required \\d+ total data blocks",
  "domain": "aws",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "ECS task fails because the Docker storage driver (devicemapper) on the container instance has insufficient free data blocks in its thin pool, often due to disk space exhaustion or misconfigured Docker storage.",
  "root_cause_type": "generic",
  "root_cause_zh": "ECS 任务失败，因为容器实例上的 Docker 存储驱动程序（devicemapper）的精简池中的空闲数据块不足，通常是由于磁盘空间耗尽或 Docker 存储配置错误。",
  "versions": [
    {
      "version": "ECS 1.62.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Docker 20.10.17",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Amazon Linux 2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Manually restarting the ECS agent or the container instance without cleaning up unused images/containers.",
      "why_fails": "The underlying thin pool is still full; restarting does not free data blocks.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increasing the ECS task memory limit without addressing Docker storage.",
      "why_fails": "The error is about disk storage blocks, not memory allocation.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Run `docker system prune -a --volumes` on the container instance to remove unused Docker objects and free thin pool space. Then restart the ECS task.",
      "success_rate": 0.85,
      "how": "Run `docker system prune -a --volumes` on the container instance to remove unused Docker objects and free thin pool space. Then restart the ECS task.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the Docker base device size by editing `/etc/docker/daemon.json` to set `{\"storage-opts\": [\"dm.basesize=50G\"]}` and restarting Docker service.",
      "success_rate": 0.7,
      "how": "Increase the Docker base device size by editing `/etc/docker/daemon.json` to set `{\"storage-opts\": [\"dm.basesize=50G\"]}` and restarting Docker service.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Run `docker system prune -a --volumes` on the container instance to remove unused Docker objects and free thin pool space. Then restart the ECS task.",
    "Increase the Docker base device size by editing `/etc/docker/daemon.json` to set `{\"storage-opts\": [\"dm.basesize=50G\"]}` and restarting Docker service."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-stopped-reason-cannotstartcontainererror.html",
  "official_doc_section": null,
  "error_code": "CannotStartContainerError",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.75,
  "resolvable": "true",
  "first_seen": "2023-08-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}