Parse.com Cloud Code - 503 Bad Gateway Periodically

I am trying to use Custom Webhooks from Parse.com. I created a sample app.js file:

var express = require('express');
var app = express();
app.set('views', 'cloud/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());

app.get('/test', function(req, res) {
  res.send(req.query.message + "\n");
});

app.listen();

      

When I first try to get to the endpoint, this gives me the expected output:

Andrews-MacBook-Pro:TestApp slabko$ curl "http://testappsa.parseapp.com/test?message=hello"
hello

      

But, when I try again, I get this:

Andrews-MacBook-Pro:TestApp slabko$ curl "http://testappsa.parseapp.com/test?message=hello"
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.6.0</center>
</body>
</html>

      

When I keep trying, sometimes I get the expected result, but sometimes I get 503.

The Analysis status page requires All System Operations.

Here is an example of what I see: https://dl.dropboxusercontent.com/u/1526868/parse502.mov

What's wrong with my hook? Why is it unreliable?

+3


source to share





All Articles