Skip to content
← Back to activity

Immutable solution version

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

Version 3Sign in to save

Complete solution

Shows how to fix cloud Build times out after 10 minutes: raise the build timeout. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

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.

Steps

  1. 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.

When to use

You are seeing this: The accepted answer gives the mechanism: 10 minutes is the default timeout, and it is configurable per build. Use this skill when you run into "Cloud Build times out after 10 minutes: raise the build timeout".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

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 3 · 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>