Agent Disconnection During High Build Load
warningConnection ManagementUpdated Jul 1, 2025
Jenkins agents disconnect mid-build due to network timeouts, cloud auto-scaling terminations, or firewall issues, causing incomplete builds and wasted compute resources.
Sources



Troubleshooting Jenkins: Resolving Common Issueswww.linkedin.com
Troubleshooting Jenkins Performance: Kubernetes Edition - Part 2www.cloudbees.com
Optimizing Jenkins to ensure fast build times with Dynatracewww.dynatrace.com
Jenkins in Production: Real Issues, RCA, and Fixes That Actually Workforem.com
Technologies:
How to detect:
Track agent connection state and monitor for agents going offline during active builds. Alert on builds failing with connection errors or incomplete logs. Monitor SSH/JNLP connection duration and network latency to agents.
Recommended action:
Enable TCP keep-alive on SSH connections (ServerAliveInterval 60). Configure cloud auto-scaling with graceful shutdown hooks to prevent mid-job termination. Increase idle timeout before agent scale-in. Only terminate agents with no active jobs.