GRS
GRS

Reputation: 3084

Google App Engine: Build Timed Out during Deployment

Edit: Google Cloud at its finest. Made absolutely no changes but deployed fine this morning.

Error after ~10m of deployment (10+ deploy attempts).

I've changed the app to add a simply function with less than 10 lines of code. It has no affect on libraries and uses native python only and hence I'm not sure how it can affect the deployment.

I've tested the app and it runs fine locally.

Here is the error that I get:

ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/xxxxxxxx/ Failure status: UNKNOWN: Error Response: [4] DEADLINE_EXCEEDED

Previously to that, logs don't show any errors, in fact everything is going as expected.

Newest entries first:

9302e2430a0e: Pushed 
4f56eb74b6bf: Pushed 
21df82f90a72: Layer already exists 
f0e2b3558b28: Layer already exists 
99c71ba2c817: Layer already exists 
2483da9621d1: Layer already exists 
af09d2110abe: Layer already exists 
d968669f4b42: Pushed 
4b1e707066a6: Layer already exists 
55530b72c8c8: Layer already exists 
62c169a7d462: Layer already exists

Upvotes: 15

Views: 9603

Answers (3)

James Trần
James Trần

Reputation: 1

For my case, I've found out the problem was that I have the same version for all gcloud app deploy command. When there's traffic, the deployment will timeout.

Upvotes: 0

Artem Kalinchuk
Artem Kalinchuk

Reputation: 6652

According to this you can change the build timeout setting with:

gcloud config set app/cloud_build_timeout 1000

Setting it to 1000 seconds in this example.

Upvotes: 17

Rex Low
Rex Low

Reputation: 2167

I have this problem too when deploying my custom image to AppEngine flex. My image requires a few ML models and takes around 2 hours to build and GAE does not seem to like it.

To build your container images outside of Google Cloud Platform, you must first upload your images to a container image repository before you can deploy your images to App Engine with the gcloud app deploy command.

In short, push your image to Google Container Registry or container image repository of your choice, then deploy with this command

gcloud app deploy --image-url gcr.io/YOUR_PROJECT_ID/YOUR_CONTAINER_IMAGE

More info here and here

Upvotes: 7

Related Questions