2

I'm just going through the node.js tutorials with a free trial account, and i'm stuck on the second one where you add a db. I add the mongodb deployment, shows up as a VM instances, fine. And my first deploy worked, but now that i'm trying to edit stuff, my deploy's keep failing.

The error i get is that I've exceeded my CPU quota. Watching the list of VM Instances under Compute Engine, i see it keeps spawning up instances, even though the app isn't being used. Guessing it just spins up 8 instances by default?

But then i guess the build system needs its own VM's, but the CPU capacity is used up, so none available to do subsequent builds?! I feel like i'm missing something...

Also, i see i can explicitly start VM's myself, so what process is creating them form me? And can i turn it off? or set a cap on number of instances it spawns?

Can i tell my project to only use 4

Also, the deploy takes forever, is that normal? Following the tutorials, so far I've only seen this command to deploy:

gcloud preview app deploy app.yaml --set-default

Is there another command that does an incremental deploy or something?

Misha Brukman
  • 12,938
  • 4
  • 61
  • 78
Klaus
  • 93
  • 1
  • 1
  • 5

1 Answers1

1

By using gcloud preview app deploy you're actually using Managed VMs which is an App Engine runtime which in turn runs Docker containers on Google Compute Engine, which it creates on its own. In other words, you're not using Google Compute Engine directly.

To get rid of extra VMs, you need to delete old app versions: navigate to Compute > App Engine > Versions and delete the versions you don't want.

See also this answer for more details and suggestions.

Community
  • 1
  • 1
Misha Brukman
  • 12,938
  • 4
  • 61
  • 78
  • Thank you!! That appears to have solved the problem. And yeah, that other answer was helpful in describing how to prevent multiple instances by specifying version on the 'gcloud' deploy command. Is there any decent documentation around this for beginners? I feel like i'm in over my head, and the documentation i find seems to be for seasoned sys admin types :( – Klaus Oct 20 '15 at 15:39
  • @Klaus: all the docs are here: https://cloud.google.com/appengine/docs/managed-vms/ and https://cloud.google.com/sdk/gcloud/reference/preview/app/ . Feel free to post more (specific) questions on SO and we'll try to help you out. – Misha Brukman Oct 20 '15 at 15:48