docker / docker/buildx

Introduce timeout keepalive timeout for connections with buildkit agents

Open
#2,770 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement status/triage
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

Description

Narrowing the scope of #1923 to a smaller change:

in our pipelines, while building larger images we experience occasional network interruptions in connections between buildx and buildkit which results in a "stale" connection where buildx waits for an undefined period of time (it times out due to our CI jobs having time limit) . Having a parameter to define wait time could help to detect broken connections sooner and retry rather than waiting indefinite amount of time for it to eventually fail and then retry.

To clarify - we could shorten timeouts for our jobs, but those timeouts cover the actual build and it can legitimately stretch for the entire duration of a timeout. However it's impossible from pipeline (or any scripting, really) perspective to distinguish between ongoing build and stale connection. Thus adding a timeout where we can state that "buildx is to give up connection with buildkit if there were no network exchange between the two for at least X minutes".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how buildx manages connections to BuildKit agents and review any existing timeout or retry handling. The change is complete when a configurable idle network timeout detects stale connections, allows retrying, and does not limit legitimately long-running builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.