expressgoogle-app-enginegoogle-cloud-platformgoogle-appengine-node

Failed Deployment in App Engine Google Cloud


I am deploying my nodejs application in google cloud app engine but it is giving error This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. -- when making request.

I had also saw some stackoverflow answers, but they didn't worked for me.

my app.yaml have this config

runtime: nodejs10

Can anyone help me out


Solution

  • You could add the following to your app.yaml:

    inbound_services:
    - warmup
    

    And then implement a handler that will catch all warmup requests, so that your application doesn't get the full load. The full explanation is given here. Another detailed post about this topic can be found here.

    Additionally you can also add automatic scaling options. You can play a bit with those to find the optimum for your application. Especially the latency related variables are important. Good to note that they can be set in a standard GAE environment.

    automatic_scaling:
      min_idle_instances: automatic
      max_idle_instances: automatic
      min_pending_latency: automatic
      max_pending_latency: automatic
    

    More scaling options can be found here.