Skip to content
Latchkey

buildx "failed to receive status: rpc error ... transport is closing" in CI

buildx talks to the BuildKit daemon over gRPC. "transport is closing" means that connection was severed while the build was running, often because the BuildKit container was killed, ran out of memory, or the runner was preempted.

What this error means

A build fails partway with "failed to receive status: rpc error: code = Unavailable desc = transport is closing". The build had been progressing before the drop.

buildx
ERROR: failed to receive status: rpc error: code = Unavailable desc = transport is closing

Common causes

The BuildKit daemon was killed or OOM-ed

A memory-heavy build can push the buildkitd container past its limit; the kernel kills it and the gRPC stream closes.

The runner or builder was preempted mid-build

A spot or ephemeral runner reclaimed during the build tears down the BuildKit connection abruptly.

How to fix it

Recreate the builder and retry

  1. Remove and recreate the buildx builder so a fresh buildkitd starts.
  2. Re-run the build; a transient daemon drop usually does not recur.
  3. If it repeats, look at memory usage during the build.
Terminal
docker buildx rm mybuilder || true
docker buildx create --name mybuilder --use
docker buildx inspect --bootstrap

Reduce build memory pressure

Lower parallelism or split heavy stages so buildkitd does not get OOM-killed.

Terminal
docker buildx build --build-arg MAKEFLAGS=-j2 .

How to prevent it

  • Give the BuildKit container enough memory for heavy builds.
  • Limit build parallelism on constrained runners.
  • Retry transient daemon drops rather than treating them as build errors.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →