Diagnosing Intermittent Agent Lost Errors in Azure DevOps Self‑Hosted Agents
0 reputation · 12 Mar 2024, 00:38 UTC
Goal: pinpoint why a self‑hosted Azure DevOps agent intermittently reports Agent Lost during high‑concurrency pipeline runs.
The agent relies on a long‑polling HTTPS listener that sends periodic heartbeats to the server. When the host exhausts its local TCP port pool or a firewall aggressively times out idle connections, the listener fails to receive a response within the configured heartbeat interval, triggering a lost‑agent state. The agent’s internal _diag folder logs the exact failure timestamps, but it is unclear whether the root cause is local resource limits, network proxy interference, or an agent configuration setting.
Unresolved questions remain about the most effective diagnostics and configuration adjustments:
- Which diagnostic steps can confirm if the agent’s internal TCP port pool is the culprit?
- Can increasing the agent’s maximum concurrent jobs mitigate the Agent Lost errors?
- What agent configuration flags influence the heartbeat timeout period?