Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Quota restrictions on Google Cloud Build

Hi,

Our build suddenly broke this week and we're a bit stuck.

We're getting:
```

Your build failed to run: failed precondition: due to quota restrictions, cannot run builds of this machine type in this region, see https://cloud.google.com/build/docs/locations#restricted_regions_for_some_projects

```

We are running in europe-west2 with e2-standard-4 VMs in a private pool. Switching to europe-west1 as indicated in the link doesn't help. Changing the VM size to e2-medium does work, but now the builds take 4 times longer.

As far as I can see none of our quotas are exceeded and none of our quotas for Cloud Build are set to 0.

Any ideas?

1 4 460
4 REPLIES 4

We've got builds timing out on `e2-medium` which isn't ideal. `e2-highcpu-2` seems to work too which halves the build time. We'd still love to know what is going on.

Hi @paulheideman,

The error message indicates a specific machine type (e2-standard-4) quota restriction in your europe-west2region, even if your overall Cloud Build quotas are not explicitly shown as exceeded. It's not a general Cloud Build quota, but a quota specifically on that machine type in that region.

Therefore, the solution lies in these steps:

  1. Contact Google Cloud Support: This is the most efficient approach. They have access to your project's specific quotas and can identify the root cause. Explain the situation: You're getting the error, you've tried different regions and machine types, and your overall Cloud Build quotas appear fine. Provide the exact error message and the relevant details (project ID, region, machine type). They can either increase your e2-standard-4 quota in europe-west2 or help you understand any underlying project-specific limitations.
  2. Investigate Project-Specific Restrictions (Less Likely but Possible): Although unlikely given the error message, check if there are any project-level settings or policies that might implicitly restrict the use of e2-standard-4 VMs in europe-west2.
  3. Monitor Quotas Closely: While you've checked your quotas, continue monitoring them closely after contacting support. There might be a lag in quota updates or a hidden quota affecting your machine type.

In summary, while changing machine types offers a workaround, resolving the underlying quota restriction is the best long-term solution. Directly contacting Google Cloud Support is the most efficient way to achieve this. They have the tools and information to diagnose and rectify the issue quickly.

I hope the above information is helpful.

Thanks for the reply @ChieKo

So basically you're telling us that we need to sign up for support? I've checked the quotas again and there is nothing. Is there nothing we can do to fix this issue with Google Cloud Build without paying for support?

Thanks,

Paul

Hi @paulheideman,

Contacting Google Cloud support is the most direct route to resolving this specific machine type quota issue in europe-west2, the Google Cloud documentation on quotas explains how quotas work. It emphasizes that quotas are managed at the project level, and that exceeding a quota may result in the error you've received. 

Therefore, engaging with Google Cloud Support remains the most likely path to a solution. They possess the internal tools and visibility to identify the root cause of the restriction and potentially adjust your project's quotas accordingly. The support team might also uncover unforeseen configurations or limitations within your project.

You can explore the Google Cloud pricing calculator to estimate the cost of support before committing. 

I hope the above information is helpful.