
Agent heartbeat
env zero records a heartbeat when the agent polls for work or reports its version. Polling updates it at most once every 5 minutes, so Last heartbeat on a healthy agent can be up to 5 minutes old. How each agent type polls:- Kubernetes agent: the agent trigger pod polls for tasks every second, and reports its version every hour.
- Standalone Docker agent: each idle container polls for tasks every 5 seconds. A container running a deployment stops polling until the deployment ends, but it still reports its version every hour.
- Azure Container Apps: KEDA polls the queue state endpoint every
pollingIntervalseconds, including while the job is scaled to zero. A recent heartbeat shows that KEDA can reach env zero with your agent token. It does not show that containers can start.
Agent status
env zero checks the conditions in this order and shows the first status that matches:
Because of this order:
- A stopped agent with an empty queue stays
Activefor up to 2 hours after its last heartbeat. - A stopped agent with queued tasks shows
Degradedonce a queued task is 5 minutes old, thenInactiveonce its last heartbeat is 2 hours old. - An agent running at least one task stays
Active, however long other tasks have been queued.Activewith a growing Pending count needs a look: see Jobs stay queued.
Pending and running counters
The two numbers next to the status count the agent’s tasks:- Pending (hourglass icon): tasks that are queued and have not started. This includes a task the agent has picked up but whose job or container has not started yet.
- Running (gear icon): tasks the agent is running.
Jobs stay queued
When Pending stays above zero, check the limit that applies to your agent type. Kubernetes agent:- Check that the agent trigger pod is running, and read its logs. When env zero rejects the agent credentials, the log shows
Agent gateway rejected the agent credentials - tasks will not be claimed until this is resolved. - A Resource Quota on
count/jobs.batchin the agent namespace caps how many deployment jobs run at once. Tasks past the cap wait in the queue. See Job Limits. - Check whether deployment pods are stuck in
Pendingbecause the cluster is out of capacity.
maxExecutionscaps how many containers run at once.- Scale on
valueLocation: "pendingAndRunningCount". WithpendingCount, KEDA subtracts running executions from the pending count, so a queued task waits while another one runs. - When no containers start at all, see No containers start when deployments are queued.
- Each container runs one deployment at a time. Run more containers to run more deployments at once.
Agent version
The Agent Version column shows the release each agent runs, so you can see which agents need an upgrade.Next steps
- Troubleshooting - Diagnose common agent crash and resource errors.
- Self-hosted Kubernetes agent - Upgrade the agent to the latest version.
- Autoscaling on Azure Container Apps - Configure KEDA scaling and troubleshoot queued deployments.
- HA/DR strategy for self-hosted agents - Plan failover for degraded or inactive agents.