Skip to content

fix: raise remote client read timeout to 300s - #296

Open
marcdavoli wants to merge 1 commit into
mainfrom
fix/raise-remote-client-read-timeout-to-300s
Open

marcdavoli wants to merge 1 commit into
mainfrom
fix/raise-remote-client-read-timeout-to-300s

Conversation

@marcdavoli

@marcdavoli marcdavoli commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Related to

This PR

  • Raises the read timeout of the remote cluster clients from 30s to 300s, just above the 290s server-side watch timeout.
  • Replaces the 30s value from chore: set a read-timeout for remote clients #293, which is a problem for healthy watches:
    • The read timeout is an idle timeout on the socket, so it applies to all open watches, even healthy ones.
    • The API server sends a bookmark on a quiet watch about every 60s. With a 30s timeout, each healthy watch on a quiet object fails with a TimedOut error every 30s.
    • Each failure makes the remote watcher log an error, send two reconciles for the ResourceSync, and repeat discovery, a GET and a new watch.
    • This applies to almost all remote watches. Flux writes the Kustomization status about once a minute, so that watch fails too.
    • Estimate for prod: about 2,500 remote watches, so about 80 watch restarts and 160 reconciles per second.
    • The image in prod and staging is from commit b49b3fc, which is older than chore: set a read-timeout for remote clients #293, so the 30s value has never run in a cluster.
  • Detects a silently dead connection 300s after its last byte. The remote watcher then reconnects and reconciles.

@marcdavoli
marcdavoli marked this pull request as ready for review November 26, 2026 17:09
@marcdavoli
marcdavoli requested a review from a team as a code owner November 26, 2026 17:09
@marcdavoli
marcdavoli enabled auto-merge November 26, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants