Technologies/Prefect/prefect.work_pool.workers.active
PrefectPrefectMetric

prefect.work_pool.workers.active

Active workers polling pool
Dimensions:None
Available on:PrometheusPrometheus (1)Native (1)
Interface Metrics (2)
PrometheusPrometheus
Number of active workers in a work pool
Dimensions:None
Native
Number of active workers polling a work pool
Dimensions:None

Technical Annotations (44)

Configuration Parameters (7)
PREFECT_CLIENT_RETRY_EXTRA_CODESrecommended: 500,421
Enables retry logic for HTTP 500 responses to prevent worker crashes
work_pool_typerecommended: cloud-run:push or ecs:push or aci:push
Serverless/push pools eliminate need for long-running workers
PREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS
Threshold for marking flow runs as Late when not started on time
server.services.late_runs.loop_seconds
Monitoring loop interval for checking late runs
pool_size
SQLAlchemy connection pool size per Prefect process; limits base connections
max_overflow
SQLAlchemy max additional connections beyond pool_size; caps connection burst
PREFECT_API_URL
Must be set to correct external Prefect server URL for client connectivity
Error Signatures (8)
500 Internal Server Errorhttp status
prefect.exceptions.PrefectHTTPStatusErrorexception
unhandled errors in a TaskGroupexception
httpx.PoolTimeoutexception
httpcore.PoolTimeoutexception
Handler '_replicate_pod_event' failed with an exceptionlog pattern
remaining connection slots are reserved for non-replication superuser connectionslog pattern
asyncpg.exceptions.TooManyConnectionsErrorexception
CLI Commands (4)
prefect work-pool create my-cloud-run-pool --type cloud-run:pushremediation
prefect work-pool provision-infra my-cloud-run-poolremediation
prefect deploy ./flows/alerts.py:process_alert --name process-alerts --work-pool my-cloud-run-poolremediation
prefect work-pool lsdiagnostic
Technical References (25)
Kubernetes work poolcomponentworker podscomponenttask podscomponentread_deploymentcomponent_submit_runcomponent_check_flow_runcomponentpush work poolcomponentserverless work poolcomponentEventTriggercomponentAutomationcomponentkopfcomponent_replicate_pod_eventcomponentprefect_kubernetes.observercomponentwork poolcomponentwork queuecomponentMarkLateRuns servicecomponentLate stateconceptflow runconceptasyncpgcomponentSQLAlchemycomponentpgbouncercomponentprefect-servercomponentprefect-workercomponentread_work_poolcomponentwork_poolcomponent
Related Insights (8)
Worker pods incur orchestration overhead in Kubernetes work poolsinfo
Worker exits unexpectedly when API server returns HTTP 500critical
Long-running polling containers waste compute when idlewarning
Prefect Kubernetes worker CPU spike and crash above 3.5K deployed flowscritical
Flow runs stuck in Late state due to missing worker subscriptioncritical
Flow runs not starting on time trigger Late statewarning
PostgreSQL connection pool exhaustion causes Prefect server errors and worker crashescritical
Deployment command hangs on read_work_pool during first production deploycritical