Tom Han
10/02/2025, 4:30 PMuv pip install -U prefect, did I hot upgraded my prefect server? or should I restart my serverMarvin
10/02/2025, 4:30 PMMarvin
10/02/2025, 4:32 PMprefect server stop
2) Apply database migrations (recommended after upgrades)
prefect server database upgrade -y
- If you have a large DB, you can increase the DB timeout:
export PREFECT_API_DATABASE_TIMEOUT=600
3) Start the server again
prefect server start
Notes:
- If you’re running Server via Docker/systemd, restart the container/service instead of using the CLI stop/start.
- Running flows on workers aren’t killed by a brief server restart, but scheduling/UX will be briefly unavailable.
- You can verify the installed version with:
prefect version
After restart, the server will use that version.
Docs for reference:
- Server CLI how-to
- Server CLI API reference
- Running Prefect processes in the backgroundTom Han
10/02/2025, 4:51 PMMarvin
10/02/2025, 4:51 PMMarvin
10/02/2025, 4:53 PMTom Han
10/02/2025, 5:06 PMMarvin
10/02/2025, 5:06 PMMarvin
10/02/2025, 5:07 PMprefect server stop
2) Upgrade Prefect and apply DB migrations
uv pip install -U prefect
prefect server database upgrade -y
- Large DB? Consider:
export PREFECT_API_DATABASE_TIMEOUT=600
3) Start the server
prefect server start
Useful checks:
- Can you load the UI at http://10.1.37.163:4200 now?
- Verify services status:
prefect server services ls
- Confirm both server and worker report the same version:
prefect version
- If you’re behind a proxy or firewall, ensure websockets are allowed to 10.1.37.163:4200 (Connection: Upgrade headers, no blocking of ws/wss).
If you need deeper error detail on the worker side, set:
export PREFECT_DEBUG_MODE=1
and rerun to see the full stack for the websocket connection.
You should be okay—your inference run likely continued locally, but some logs/events during the disconnect may not appear in the UI.
Refs:
- Server CLI how-to
- Server CLI API reference
- Worker health and behavior
Want me to help verify your server and worker versions and settings? If so, let me know how you’re starting the server (CLI, Docker, systemd) and the value of PREFECT_API_URL on the worker.