Technologies/Prefect/prefect.agent.heartbeat
PrefectPrefectMetric

prefect.agent.heartbeat

Agent heartbeat freshness
Dimensions:None
Available on:Native (1)
Interface Metrics (1)
Native
Time since last agent heartbeat in seconds
Dimensions:None

Technical Annotations (44)

Configuration Parameters (1)
checkpoint_everyrecommended: 1
ensures EventsClient sends events immediately rather than buffering
Error Signatures (8)
Invalid input ConnectionInputs.SEND_HEADERS in state ConnectionState.CLOSEDexception
h2.exceptions.ProtocolErrorexception
httpcore.LocalProtocolErrorexception
httpx.LocalProtocolErrorexception
Agent stopped!log pattern
Failed the last 3 attemptslog pattern
FileNotFoundError: [Errno 2] No such file or directory: 'prefect'exception
cannot find a heartbeaterror code
CLI Commands (4)
prefect agent start --pool default-agent-pool --work-queue defaultdiagnostic
python -m sitediagnostic
. /path/to/.venv/bin/activate && /path/to/.venv/bin/dask-workerremediation
prefect agent startdiagnostic
Technical References (31)
runnercomponentghost runsconceptworkercomponentRunnercomponentEventsClientcomponentEventWorkercomponenth2componenthttpcorecomponenthttpxcomponentHTTP/2protocolcritical_service_loopcomponentcheck_for_cancelled_flow_runscomponentget_and_submit_flow_runscomponentsubprocess.PopencomponentDaskExecutorcomponentsystemdcomponent/prefect/utilities/executors.pyfile pathsupervisordcomponentdocker-in-dockerconceptscreencomponentagentcomponentflow runconceptnotificationcomponentlate stateconceptk8s agentcomponentliveness probeconceptPrefect CloudcomponentZombie Killer Servicecomponentwork queuecomponentKarpentercomponentspot instanceconcept
Related Insights (13)
Ghost runs persist when runners die without server notificationcritical
Runners lack heartbeat observability available for workersinfo
Flow run heartbeat events delayed until run completionwarning
HTTP/2 protocol error causes agent to stop after failed retriescritical
Agent uptime decreases progressively before complete failurewarning
Heartbeat fails when Dask worker systemd service lacks virtual environment PATHcritical
Agent heartbeat failure due to docker-in-docker resource exhaustioncritical
Prefect agent freezes in background screen sessioncritical
Flow late-state notifications fail when agent is unresponsivewarning
Agent process alive but unresponsive after prolonged operationcritical
Prefect agents run indefinitely until manually killedinfo
Task heartbeat timeout creates zombie tasks during API outagewarning
Karpenter spot instance termination not detected by Prefect causing stuck flowscritical