<@ULVA73B9P> I just deployed a dummy flow that jus...
# ask-marvin
m
@Marvin I just deployed a dummy flow that just returns True, the runs stays in pending instead of running. first time I have this issue (I have other flow s running without any difficulty). What is happening?
m
thought for 301.0 seconds
Likely cause: in Prefect 3.x, a flow run in “Pending” means it was created but no worker has picked it up from its work pool/queue yet. The most common reasons are: - No worker running for that work pool, or the worker is polling a different queue - The work pool is paused - A concurrency limit is blocking new runs - The deployment targets the wrong work pool/queue (different from your other working flows) - For Docker/Kubernetes/etc., the worker doesn’t have the required extras installed to submit infrastructure jobs Quick checks 1) Verify the deployment’s target pool/queue
Copy code
prefect deployment ls
prefect deployment inspect <flow-name>/<deployment-name>
Confirm the “Work pool” and “Work queue” shown here match what your worker is polling. 2) Inspect the work pool
Copy code
prefect work-pool ls
prefect work-pool inspect "<pool-name>"
Look for: - Paused: false - Concurrency limit: None or a number with available capacity - Type matches your intent (process, docker, kubernetes, etc.) 3) Ensure a worker is running and polling the correct pool/queue - Process/local:
Copy code
prefect worker start -p "<pool-name>"
- Docker:
Copy code
uv run --with 'prefect[docker]' prefect worker start -p "<pool-name>"
- Kubernetes:
Copy code
uv run --with 'prefect[kubernetes]' prefect worker start -p "<pool-name>"
If your worker was started with specific queues, make sure they include the deployment’s queue name. 4) Check concurrency limits - Pool-level:
Copy code
prefect work-pool inspect "<pool-name>"
# If needed:
prefect work-pool clear-concurrency-limit "<pool-name>"
# or
prefect work-pool set-concurrency-limit "<pool-name>" 10
- Global workflow concurrency: check the UI under Workflows > Concurrency (docs) 5) Look at the run detail in the UI - The run’s State message will often say “waiting for a worker” or mention a limit that’s been hit. A couple of targeted questions to help pinpoint it: - Which Prefect version and environment (Cloud or self-hosted)? - What work pool and queue does this deployment target, and do you have a worker running for that pool/queue? - Is the pool paused or does it have a concurrency limit? - Does this deployment use a different pool type than your other working flows? Related docs: - Work pools and workers: docs - States (what “Pending” means): docs - Concurrency limits: docs
m
@Marvin I am using serve locally, no work pool involded
m
thought for 135.9 seconds
Got it — thanks for the context. Even when you’re using Prefect Server locally, deployments in Prefect 3.x still run via a work pool and require a worker to pick up runs. If no worker is polling the target pool/queue, the run will remain in Pending. A couple quick checks to confirm what’s happening: 1) What Prefect version are you on?
Copy code
prefect version
- If it’s 3.x: you need a work pool + a running worker. - If it’s 2.x: you need an agent polling a work queue (different model). 2) If 3.x, verify the deployment’s target pool/queue and that a worker is running: - Inspect the deployment to see which pool/queue it targets
Copy code
prefect deployment ls
prefect deployment inspect <flow-name>/<deployment-name>
- List and inspect your pools
Copy code
prefect work-pool ls
prefect work-pool inspect "<pool-name>"
Confirm the pool is not paused and doesn’t have a blocking concurrency limit. - Start a worker for that pool (process/local example)
Copy code
prefect worker start -p "<pool-name>"
If you’re using Docker or K8s pools, start with the appropriate extras:
Copy code
uv run --with 'prefect[docker]' prefect worker start -p "<pool-name>"
uv run --with 'prefect[kubernetes]' prefect worker start -p "<pool-name>"
3) Re-run and watch the run details in the UI — the state message will usually say “waiting for a worker” if that was the issue. If you’re actually on Prefect 2.x, replace the above with an agent: - Start an agent for the correct work queue:
Copy code
prefect agent start -q "<queue-name>"
(Only do this if you confirm you’re on 2.x; in 3.x, agents were replaced by work pools/workers.) Can you share: - Your Prefect version output - The deployment’s work pool/queue (from
prefect deployment inspect
) - Whether a worker is currently running for that pool Related docs: - Work pools/workers (3.x): docs - States and what “Pending” means: docs