Fugo Takefusa
09/30/2025, 12:59 AMMarvin
09/30/2025, 12:59 AMMarvin
09/30/2025, 1:05 AMprefect version
prefect server services list-services
You should see services like scheduler, event_persister, event_logger, and task_run_recorder. If they’re disabled or not listed, your server is likely running without services.
- If you started the API without services (e.g., via uvicorn or with --no-services), either:
- Start the monolithic server (web + services):
prefect server start
Make sure you are NOT using the --no-services
flag.
- Or, if you must run the API separately, start the loop services in a separate process/sidecar:
prefect server services start
Critical environment variables
- Ensure these are set in your server container (they’re enabled by default, but can be disabled by env):
- PREFECT_API_SERVICES_TASK_RUN_RECORDER_ENABLED=true
- PREFECT_API_SERVICES_EVENT_PERSISTER_ENABLED=true
- PREFECT_API_SERVICES_EVENT_LOGGER_ENABLED=true
- If you’re toggling others, also keep PREFECT_API_SERVICES_SCHEDULER_ENABLED=true
- Ensure the UI points to the correct API:
- PREFECT_UI_API_URL=<https://your-api-domain>
(whatever your ECS API is)
- Ensure flows/workers can report to your API:
- PREFECT_API_URL=<https://your-api-domain>
inside your worker and flow containers
Database migrations
- If you upgraded Prefect in ECS, run the DB migrations once:
prefect server database upgrade
A schema mismatch can prevent new entities from being recorded cleanly.
What I’d like to confirm
- Do flow runs appear in the UI and only the task runs are missing, or are both missing?
- How are you starting the server in ECS (e.g., prefect server start
, a custom uvicorn
command, or with --no-services
)?
- What are the values of PREFECT_API_URL
(in your worker/flow containers) and PREFECT_UI_API_URL
(in your UI container)?
- Output of prefect server services list-services
from the ECS server container
References
- Prefect 3 settings reference (includes server/UI/services env vars): Settings reference
Once you share those details, I can help pinpoint exactly which toggle or process needs to be fixed.