Browse files

Do not assume apps are not already running. If sc-proxy falls over so…

…mehow,

they may still be running (pre-stop is not invoked in that case). If we don't
restart them, we'll wind up with redundant 'forever' processes, leading to
a pinned CPU trying to restart extra copies of each app
  • Loading branch information...
1 parent 0b9152d commit 739e4fd33ac79b3e123396f2e0bc677cbec1676b @boutell boutell committed Apr 6, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 sc-proxy/upstart/stagecoach.conf
View
5 sc-proxy/upstart/stagecoach.conf
@@ -13,6 +13,11 @@ start on startup
stop on shutdown
pre-start script
+ # Do not assume apps are not already running. If sc-proxy falls over somehow,
+ # they may still be running (pre-stop is not invoked in that case). If we don't
+ # restart them, we'll wind up with redundant 'forever' processes, leading to
+ # a pinned CPU trying to restart extra copies of each app
+ bash /opt/stagecoach/sc-proxy/sc-stop-all
bash /opt/stagecoach/sc-proxy/sc-start-all
end script

0 comments on commit 739e4fd

Please sign in to comment.