Rahul Jain
Rahul Jain

Reputation: 167

gcloud app deploy fails for flexible build

I am trying to run the hello world app for Google App Engine - Custom runtime. I am using the following example:

https://cloud.google.com/appengine/docs/flexible/custom-runtimes/quickstart

The build goes successfully, however, the terminal gets stuck on:

Updating service [test] (this may take several minutes)...⠹

Post this, it fails with the following error:

(gcloud.app.deploy) Error Response: [4] App Engine Flexible timed out while configuring resources, internal operation

  1. Although it is a flexible deployment, the console shows a size next to the version. Screenshot for the image

1.1 Edit: I tried deploying another project, and that too fails with the same error. All the versions show that they are serving, but only the first version starts instances.

Size is 510kb

  1. I am trying to deploy it in Asia-South-1 Mumbai region.

  2. Is there a way to debug and find what is causing the issue. Other than this, I have a firebase project.

Thank you!

Any help is highly appreciated.

Upvotes: 2

Views: 165

Answers (1)

DazWilkin
DazWilkin

Reputation: 40051

Given that the sample is mostly just an index.html file, the size is fine.

The dashboard shows that your app is serving so I think it is running.

Did you try clicking the hyperlink beneath "versions" on the dashboard?

There are various ways to check the status.

From the browser:

You can check the build history: https://console.cloud.google.com/cloud-build/builds?project=[[YOUR-PROJECT-ID]]

And the logs: https://console.cloud.google.com/logs/query;query=resource.type%3D%22gae_app%22%20resource.labels.module_id%3D%22default%22?project=[[YOUR-PROJECT-ID]]

NOTE This encodes a log filter:
resource.type="gae_app" resource.labels.module_id="default"

From the command-line:

You can browse the app:

gcloud app browse --project=${PROJECT}

You can check the build history:

gcloud builds list --project=${PROJECT}
gcloud builds describe ${ID} --project=${PROJECT}

And the logs:

gcloud app logs tail --project=${PROJECT}

Or:

FILTER="resource.type=\"gae_app\" resource.labels.module_id=\"default\""
gcloud logging read "${FILTER}" \
--project=${PROJECT}

Or for more precision:

gcloud logging read "${FILTER} logName=\"projects/${PROJECT}/logs/appengine.googleapis.com%2Fapp\"" \
--project=${PROJECT} \
--format="value(textPayload)"

Upvotes: 1

Related Questions