{
  "id": "python/starlette-uvicorn-reload-loop",
  "signature": "WARNING:  WatchFiles detected changes in 'app/main.py'. Reloading... (repeated infinitely)",
  "signature_zh": "WARNING: WatchFiles 检测到 'app/main.py' 的更改。正在重载……（无限重复）",
  "regex": "WARNING:\\ \\ WatchFiles\\ detected\\ changes\\ in\\ 'app/main\\.py'\\.\\ Reloading\\.\\.\\.\\ \\(repeated\\ infinitely\\)",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Hot reload watches a directory written to by the app itself (logs, sqlite, uploads), triggering an endless reload loop.",
  "root_cause_type": "generic",
  "root_cause_zh": "热重载监视的目录被应用自身写入（日志、sqlite、上传），触发无限重载循环。",
  "versions": [
    {
      "version": "0.30+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Loop resumes once the app writes again.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Suppresses log output but watcher still fires.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.93,
      "how": "uvicorn app.main:app --reload --reload-exclude '*.log' --reload-exclude 'data/*'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "LOG_DIR = os.environ.get('LOG_DIR', '/var/log/myapp')",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}