Node.js restarting every minute on OpsWorks amazon? -


i use opsworks on aws amazon. have set node.js app on , when deploy works should, main script (server.js) being restarted every minute. code looks like:

var database = require('./database'); var config = require('./config.json')['development'];  console.log('started');  process.on('uncaughtexception', function(err)  {             console.log(err); });  foo();  function foo() {        // code     settimeout(foo, 2000); } 

why printed out "started" every minute?

opsworks checks health of app every minute , restarts health check (http get) fails. fact restarted every minute suggests health check failing. make sure app listens port 80.

the application must listen on port 80 (for http requests) or port 443 (for https requests).

if still have issues, make sure app meets conditions laid out in doc: deploying node.js apps


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -