{
  "id": "python/starlette-uvicorn-address-in-use",
  "signature": "OSError: [Errno 98] Address already in use",
  "signature_zh": "OSError: [Errno 98] 地址已被占用",
  "regex": "OSError:\\ \\[Errno\\ 98\\]\\ Address\\ already\\ in\\ use",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Another process (often a previous uvicorn reloader) is already bound to the host/port.",
  "root_cause_type": "generic",
  "root_cause_zh": "另一个进程（通常是之前的 uvicorn 重载进程）已占用该主机/端口。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Reload doesn't free the port; it spawns another process that fails to bind.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "More workers compete for the same port and worsen the conflict.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "Find and kill the holder:\nlsof -i :8000\nkill -9 <PID>",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Run on a different port:\nuvicorn app:app --port 8001",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}