Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to update VM with nodejs app on Google App Engine

When I try to deploy from the gcloud CLI I get the following error.

Copying files to Google Cloud Storage...
Synchronizing files to [gs://staging.logically-abstract-www-site.appspot.com/].
Updating module [default]...\Deleted [https://www.googleapis.com/compute/v1/projects/logically-abstract-www-site/zones/us-central1-f/instances/gae-builder-vm-20151030t150724].
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [4] Timed out creating VMs.

My app.yaml is:

runtime: nodejs
vm: true
api_version: 1

automatic_scaling:
  min_num_instances: 2
  max_num_instances: 20
  cool_down_period_sec: 60
  cpu_utilization:
    target_utilization: 0.5

and I am logged in successfully and have the correct project ID. I see the new version created in the Cloud Console for App Engine, but the error is after that it seems.

In the stdout log I see both instances go up with the last console.log statement I put in the app after it starts listening on the port, but in the shutdown.log I see "app was unhealthy" and in syslog I see "WARNING: never got healthy response from app, but sending /_ah/start query anyway."

like image 409
ajklein Avatar asked Oct 18 '22 23:10

ajklein


1 Answers

From my experience with nodejs using Google Cloud App Engine, I see that "Timed out creating VMs" is neither a traditional timeout nor does it have to do with creating VMs. I had found that other errors were reported during the launch of the server --which happens to be right after VMs are created. So, I recommend checking console output to see if it tells you anything.

To see the console output:

  • For a vm instance, then go to /your/ vm instances and click the vm instance you want, then scroll towards the bottom and click "Serial console output".
  • For stdout console logging, go monitoring /your/ logs then change the log type dropdown from Request to be stdout.

I had found differences in the process.env when running locally versus in the cloud. I hope you find your solution too --good luck!

like image 137
Mark Maruska Avatar answered Oct 23 '22 09:10

Mark Maruska