Failed to update VM using nodejs app in 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:

 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 successfully registered and have the correct project identifier. I see a new version created in the Cloud Console for the App Engine, but after that an error appears.

In the stdout log, I see that both instances are processed by the last console.log application, which I add to the application after listening to it on the port, but in shutdown.log I see that โ€œthe application was unhealthyโ€ and in syslog I see โ€œWARNING: never received a healthy response from the app, but still sent / _ah / start. "

+5
source share
1 answer

From my experience with nodejs using the Google Cloud App Engine, I see that Finishing Up for Virtual Machines is not a traditional timeout and is not related to creating virtual machines. I found that during server startup other errors were reported that happen immediately after creating the virtual machines. Therefore, I recommend checking the console output if it says something.

To see console output:

  • For a vm instance, go to / your / vm instances and click the desired vm instance, then scroll down and click Serial Console Exit.
  • To log the stdout console log, go to monitoring / your / logs , then change the log type drop-down menu from the request to be standard.

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

+3
source

Source: https://habr.com/ru/post/1234884/


All Articles