2

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.

Rahul Jain
  • 117
  • 6

1 Answers1

1

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)"
DazWilkin
  • 32,823
  • 5
  • 47
  • 88
  • Although it says serving, clicking the link throws a 404. If I stop and start the service it begins to work. This works only with the first instance of the service. Every other instance does not start any instance and show either the service error or 404. Everytime the deployment on my command line fails with the error: `(gcloud.app.deploy) Error Response: [4] App Engine Flexible timed out while configuring resources, internal operation projects/####/regions/asia-south1/operations/#### `. Updated the screenshot in the post – Rahul Jain May 18 '20 at 04:52
  • Are you including the `www` subdirectory from the repo? That may explain the 404 (not found) – DazWilkin May 18 '20 at 05:04
  • For the helloworld example, I deployed it as is, and did not make any changes. I think that might be because there are no instances that start up. It either fails in server error or 404. – Rahul Jain May 18 '20 at 05:18
  • Additionally, any idea why is a size being reported?. The explainer text on the top says -->. "Flexible environment code is stored and billed from Google Cloud Storage, and does not count towards the limits on App Engine code storage. Flexible environment versions should not report a size." – Rahul Jain May 18 '20 at 05:20
  • I wonder whether there's a capacity issue in that region and you're unable to deploy because there's insufficient capacity to give you? I recommend you ask Google Support for help. – DazWilkin May 18 '20 at 16:35
  • you can open a case with [Google Cloud Platform Support](https://cloud.google.com/support/docs/procedures) – marian.vladoi May 19 '20 at 09:36