Sauron Sauron - 8 months ago 23
Node.js Question

Google App Engine Node.js Application Unhealthy

I am attempting to test a fairly straightforward node.js app on google app engine. As seen below, all it is intended to do is listen to a change in a Firebase database, and subsequently send a GCM message to a user:

var Firebase = require("firebase");
var gcm = require('node-gcm');

// Create a reference to the push notification queue
var ref = new Firebase("firebaseDB");

var message = new gcm.Message();

var regTokens = ['A user GCM reg token'];

// Set up the sender with you API key
var sender = new gcm.Sender('GCM sender ID');

message.addData('syncNewData', 'Hello Member!');

ref.on("value", function(snapshot) {

// Now the sender can be used to send messages
sender.send(message, { registrationTokens: regTokens }, function (err, response) {
if(err) console.error(err);
else console.log(response);

}, function (errorObject) {
console.log("The read failed: " + errorObject.code);

However, every time I attempt to deploy to the app engine, the process runs smoothly until
Updating module [default].../
, running for several minutes, whereby the error appears:

ERROR: ( Error Response: [13] Timed out when starting
VMs. It's possible that the application code is unhealthy. (0/2 ready, 2 still

I am fairly new to node.js as well as appengine, but I am simply attempting to test to ensure all components work together.

Why would this error exist?


This almost always means you have a crash during app startup when running in App Engine. We're not very good at surfacing these kinds of crashes today during deployment (working on that). To see what's going on:

  1. Go to the developers console
  2. Click on cloud logging

cloud logging

  1. Look for a crash.log or stderr:


That's where you'll usually find the problem. Hope this helps!