Browse files

[fix] Added fix to upstart script, and process.kill(0) on app

  • Loading branch information...
1 parent 869878a commit 6313e6502fc84262215d2ade186922f51ae66f8e @alejandro alejandro committed Apr 6, 2012
Showing with 9 additions and 3 deletions.
  1. +2 −0 app.js
  2. +3 −0 upstart/app.conf
  3. +4 −3 upstart/proxy.conf
View
2 app.js
@@ -111,6 +111,8 @@ setInterval(function(){
process.on('uncaughtException', function (err) {
dash.emit('nodester::uE',{ msg:err.message,stack:err.stack.toString()})
log.fatal(err.stack)
+ // Kill it with fire dude
+ process.kill(0);
})
/* Routes */
View
3 upstart/app.conf
@@ -3,6 +3,9 @@ description "nodester app server"
author "contra"
start on startup
+respawn
+# Give up if restart occurs 10 times in 90 seconds.
+respawn limit 10 90
stop on shutdown
script
View
7 upstart/proxy.conf
@@ -3,12 +3,13 @@ description "nodester proxy server"
author "contra"
start on startup
+respawn
+# Give up if restart occurs 10 times in 90 seconds.
+respawn limit 10 90
stop on shutdown
script
export HOME="/node"
exec sudo node /node/nodester/nodester/proxy/proxy.js | /node/nodester/nodester/node_modules/bunyan/bin/bunyan >> /node/logs/proxy.log
- respawn
- # Give up if restart occurs 10 times in 90 seconds.
- respawn limit 10 90
+
end script

0 comments on commit 6313e65

Please sign in to comment.