Skip to content

Reduce default agent ping interval to 30s to avoid idle timeouts - #26448

Closed
abhay1999 wants to merge 1 commit into
jenkinsci:masterfrom
abhay1999:fix-agent-connection-26338
Closed

Reduce default agent ping interval to 30s to avoid idle timeouts#26448
abhay1999 wants to merge 1 commit into
jenkinsci:masterfrom
abhay1999:fix-agent-connection-26338

Conversation

@abhay1999

Copy link
Copy Markdown

Summary

This PR reduces the default TCP agent ping interval from 5 minutes to 30 seconds in .

Modern Jenkins installations frequently run behind load balancers and reverse proxies (such as AWS NLB + nginx-ingress) that use relatively short idle timeouts (around 60 seconds). With the existing 5-minute default, there can be long idle periods with no traffic, during which intermediaries terminate the TCP connection. The next scheduled then sees a and the server continues to believe the agent is already connected for several minutes, leading to repeated logs and temporarily unavailable agents.

Aligning the default TCP ping interval with the websocket ping behavior (30s) keeps traffic flowing frequently enough to avoid these idle timeouts by default, without requiring manual system property tuning.

This change is motivated by and intended to address #26338 and is consistent with the proposal in #26353.

Details

  • Change in from to .
  • Existing system properties and the deprecated continue to override the default when explicitly set.

Testing

  • already verifies that uses the default constants when no system properties are set and that the system properties override behavior is preserved. Since these tests assert via the constants, they continue to validate the wiring with the new default value.

Credits

Authored by @abhay1999 for improving robustness of Jenkins agent connections in modern cloud / proxy environments.

Made with Cursor

@github-actions

github-actions Bot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Missing required label for changelog. Requires at least 1 of: bug, developer, dependencies, internal, localization, major-bug, major-rfe, rfe, regression-fix, removed, skip-changelog. Found: spam.

You can add the required label by adding a comment with the following text: /label <category>

@mawinter69

Copy link
Copy Markdown
Contributor

Why do you open a new PR when there is already an identical PR open?
Any why did you ignore the PR template that gives clear instructions how to format it?

@lemeurherve

lemeurherve commented Mar 13, 2026

Copy link
Copy Markdown
Member

@lemeurherve

Copy link
Copy Markdown
Member

Tempted to create and add that new label to easily identify such pull requests:

image

WDYT?

@jonesbusy

Copy link
Copy Markdown
Contributor

WDYT?

On plugins I usually mark them as spam.

@lemeurherve lemeurherve added the spam This pull request is not a valid change proposal (e.g. vandalism, empty changes) label Mar 13, 2026
@abhay1999
abhay1999 deleted the fix-agent-connection-26338 branch March 13, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spam This pull request is not a valid change proposal (e.g. vandalism, empty changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants