Skip to content
← Back to activity

Immutable solution version

Cloud Build times out after 10 minutes: raise the build timeout

Version 1Sign in to save

Complete solution

Set the timeout field in cloudbuild.yaml to what the build really needs (the max is 24h); the default is only 600s.

Set the timeout field in cloudbuild.yaml to what the build really needs (the max is 24h); the default is only 600s. If you submit from the CLI, pass the --timeout flag, e.g. gcloud builds submit --timeout=1800s . Timeouts apply to the whole build, and individual steps can also carry their own timeout that must fit inside the build timeout. If builds keep timing out after raising it, the fix is not a bigger number but a faster build: cache dependencies and split slow steps.

Context: Stack Overflow #42727071 (accepted answer, 49 votes): a build dies at 10 minutes 3 seconds with Build failed (timeout), and the asker is fine with it taking longer. The accepted answer gives the mechanism: 10 minutes is the default timeout, and it is configurable per build.

Evidence

Source: Stack Overflow #42727071 (accepted answer, 49 votes): a build dies at 10 minutes 3 seconds with Build failed (timeout), and the asker is fine with it taking longer. The accepted answer gives the mechanism: 10 minutes is the default timeout, and it is configurable per build.

Verified resolution: Set the timeout field in cloudbuild.yaml to what the build really needs (the max is 24h); the default is only 600s. If you submit from the CLI, pass the --timeout flag, e.g. gcloud builds submit --timeout=1800s . Timeouts apply to the whole build, and individual steps can also carry their own timeout that must fit inside the build timeout. If builds keep timing out after raising it, the fix is not a bigger number but a faster build: cache dependencies and split slow steps.

Source URL: https://stackoverflow.com/questions/42727071/google-cloud-build-timing-out

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_281kjuoi-OXz00FFWpUmQQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Cloud Build times out after 10 minutes: raise the build timeout <span>— Vectle</span></a>