Will It Vibe logoWill It Vibe?
FASTAPI-009Low severity-4 points

uvicorn.run(reload=True) left in the production entrypoint

Part of Architecture & Best Practices, which counts for 15% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.

What it detects

reload=True starts uvicorn's file-watching supervisor process, which exists purely to restart the server on code changes during local development. Left in the script a production process runs, it doubles process overhead and can restart the app mid-request whenever any file on disk changes. Heuristic: only flags the __main__-guarded launch block, not every uvicorn.run call.

Why it matters

reload=True starts uvicorn's file-watching supervisor process, which restarts the server whenever a file on disk changes. That exists purely to speed up local development. In a script that a production process actually runs, it means double the process overhead for the watcher, and a container filesystem change (a log file, a temp file, a mounted volume update) can trigger an unplanned restart mid-request.

How to fix it

Remove reload=True from the uvicorn.run() call in the production entrypoint, or better, drive it from an environment variable so it is only True when a local-development flag is set. In real production deployments, run uvicorn through a process manager (gunicorn with the uvicorn worker class, or a container orchestrator) rather than a `python main.py` script at all.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Architecture & Best Practices checks