prefect.database.connections.active
Active database connectionsDimensions:None
Available on:
Prometheus (1)
Interface Metrics (1)
Technical Annotations (39)
Configuration Parameters (6)
server.database.sqlalchemy.pool_sizerecommended: 60 (current, may need increase)server.database.sqlalchemy.max_overflowrecommended: 10 (current, may need increase)server.database.sqlalchemy.pool_timeoutrecommended: 30pool_sizemax_overflowmax_connectionsError Signatures (11)
asyncpg.exceptions.DeadlockDetectedErrorexceptionsqlalchemy.exc.DBAPIErrorexceptiondeadlock detectedlog patternwaits for ShareLock on transactionlog patternConnectionResetError: [Errno 104] Connection reset by peerexceptionhttpx.ReadErrorexceptionanyio.BrokenResourceErrorexceptionBrokenPipeError: [Errno 32] Broken pipeexceptionremaining connection slots are reserved for non-replication superuser connectionslog patternasyncpg.exceptions.TooManyConnectionsErrorexception500 Internal Server Errorhttp statusCLI Commands (1)
SELECT count(*) AS total_connections, count(*) FILTER (WHERE state = 'active') AS active, count(*) FILTER (WHERE state = 'idle') AS idle, (SELECT setting::int FROM pg_settings WHERE name = 'max_connections') AS max_connections FROM pg_stat_activity;diagnosticTechnical References (21)
flow_runcomponentdatabase locksconceptworker podscomponentconcurrencyconcepttask_runcomponentasyncpgcomponentON CONFLICTconcept/usr/local/lib/python3.12/site-packages/prefect/server/services/task_run_recorder.pyfile pathShareLockconceptget_runs_in_work_queuecomponentprefect.agentcomponenthttpxcomponentorioncomponentprefect_kubernetes.observercomponent_replicate_pod_eventcomponentSQLAlchemycomponentpgbouncercomponentprefect-servercomponentprefect-workercomponentconcurrency context managercomponentpg_stat_activitycomponentRelated Insights (8)
Database connection pool exhaustion causes severe API slowdown after Prefect 3.x upgradecritical
▸
Long-running tasks monopolize worker resources and block concurrencywarning
▸
Database deadlock on concurrent task_run insertscritical
▸
Connection reset errors in self-hosted Prefect agent-server communicationwarning
▸
Prefect event filter misconfiguration causes excessive database loadcritical
▸
PostgreSQL connection pool exhaustion causes Prefect server errors and worker crashescritical
▸
Database connection pool exhaustion from unlimited concurrencycritical
▸
Connection count approaching max_connections limitcritical
▸