Skip to content
Latchkey

Earthly "waiting for buildkit" timeout in CI

After launching buildkitd, Earthly polls until the daemon is ready. If the daemon is slow to start, under-resourced, or wedged, the poll times out and Earthly gives up with "waiting for buildkit".

What this error means

earthly prints "waiting for buildkit" repeatedly and then fails with a readiness timeout, without ever running a build step.

earthly
waiting for buildkit...
waiting for buildkit...
Error: buildkit did not become ready within 120s

Common causes

The daemon is slow or resource-starved

A cold buildkitd on a small runner, or one restoring a large cache, can take longer than the readiness timeout to come up.

A wedged or crashed daemon

A daemon that crashed on start or is stuck restoring a corrupt cache never signals ready, so the poll times out.

How to fix it

Restart the daemon and check its logs

  1. Stop and restart Earthly's buildkitd container.
  2. Read the buildkitd logs to see why it stalled.
  3. Prune a large or corrupt cache if restore is the cause.
Terminal
earthly bootstrap
docker logs earthly-buildkitd

Give the daemon more time and resources

Raise the readiness timeout and use a larger runner so the daemon can initialize.

Terminal
export EARTHLY_BUILDKIT_STARTUP_TIMEOUT=300
earthly +build

How to prevent it

  • Use runners with enough CPU and memory for buildkitd.
  • Prune the cache periodically so restore stays fast.
  • Raise the startup timeout for cold daemons.

Frequently asked questions

What causes "Earthly "waiting for buildkit""?
A cold buildkitd on a small runner, or one restoring a large cache, can take longer than the readiness timeout to come up.
How do I fix Earthly "waiting for buildkit"?
Restart the daemon and check its logs

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card