# WARNING:  WatchFiles detected changes in 'app/main.py'. Reloading... (repeated infinitely)

- **ID:** `python/starlette-uvicorn-reload-loop`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Hot reload watches a directory written to by the app itself (logs, sqlite, uploads), triggering an endless reload loop.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.30+ | active | — | — |

## Workarounds

1. **** (93% success)
   ```
   uvicorn app.main:app --reload --reload-exclude '*.log' --reload-exclude 'data/*'
   ```
2. **** (90% success)
   ```
   LOG_DIR = os.environ.get('LOG_DIR', '/var/log/myapp')
   ```

## Dead Ends

- **** — Loop resumes once the app writes again. (70% fail)
- **** — Suppresses log output but watcher still fires. (85% fail)
