JenkinsKubernetes

Agent Disconnection During High Build Load

warning
Connection 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.

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.