{
  "id": "nginx/client-body-temp-file-write-failed",
  "signature": "client_body_temp_file_write() failed (28: No space left on device) while reading client request body",
  "signature_zh": "写入客户端请求体临时文件失败（28：设备上无剩余空间）",
  "regex": "client_body_temp_file_write\\(\\) failed \\(28: No space left on device\\)",
  "domain": "nginx",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The filesystem partition where nginx stores temporary client body files (usually /var/lib/nginx/tmp or /tmp) is full.",
  "root_cause_type": "generic",
  "root_cause_zh": "nginx 存储客户端请求体临时文件的分区（通常是 /var/lib/nginx/tmp 或 /tmp）已满。",
  "versions": [
    {
      "version": "nginx-1.24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-1.25.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-1.26.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The buffer only delays temp file creation; large requests will still hit disk.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "It forces all body data into memory, which can cause OOM for large uploads.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Nginx will fail to create the temp directory and return a permission denied error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Free up space on the partition or move the temp directory to a partition with more space. Example:\nsudo du -sh /var/lib/nginx/tmp\nsudo rm -rf /var/lib/nginx/tmp/*\n# Or change path in nginx.conf:\nclient_body_temp_path /data/nginx/tmp 1 2;",
      "success_rate": 0.95,
      "how": "Free up space on the partition or move the temp directory to a partition with more space. Example:\nsudo du -sh /var/lib/nginx/tmp\nsudo rm -rf /var/lib/nginx/tmp/*\n# Or change path in nginx.conf:\nclient_body_temp_path /data/nginx/tmp 1 2;",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the partition size if using LVM or cloud storage. For example, on AWS EBS, extend the volume and resize the filesystem.",
      "success_rate": 0.9,
      "how": "Increase the partition size if using LVM or cloud storage. For example, on AWS EBS, extend the volume and resize the filesystem.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Free up space on the partition or move the temp directory to a partition with more space. Example:\nsudo du -sh /var/lib/nginx/tmp\nsudo rm -rf /var/lib/nginx/tmp/*\n# Or change path in nginx.conf:\nclient_body_temp_path /data/nginx/tmp 1 2;",
    "Increase the partition size if using LVM or cloud storage. For example, on AWS EBS, extend the volume and resize the filesystem."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_temp_path",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.92,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}