summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/unicorn.rb.example26
-rw-r--r--lib/support/init.d/gitlab2
2 files changed, 14 insertions, 14 deletions
diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example
index e010de6d6a9..294d521b66e 100644
--- a/config/unicorn.rb.example
+++ b/config/unicorn.rb.example
@@ -64,19 +64,19 @@ before_fork do |server, worker|
# installations. It is not needed if your system can house
# twice as many worker_processes as you have configured.
#
- # # This allows a new master process to incrementally
- # # phase out the old master process with SIGTTOU to avoid a
- # # thundering herd (especially in the "preload_app false" case)
- # # when doing a transparent upgrade. The last worker spawned
- # # will then kill off the old master process with a SIGQUIT.
- # old_pid = "#{server.config[:pid]}.oldbin"
- # if old_pid != server.pid
- # begin
- # sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
- # Process.kill(sig, File.read(old_pid).to_i)
- # rescue Errno::ENOENT, Errno::ESRCH
- # end
- # end
+ # This allows a new master process to incrementally
+ # phase out the old master process with SIGTTOU to avoid a
+ # thundering herd (especially in the "preload_app false" case)
+ # when doing a transparent upgrade. The last worker spawned
+ # will then kill off the old master process with a SIGQUIT.
+ old_pid = "#{server.config[:pid]}.oldbin"
+ if old_pid != server.pid
+ begin
+ sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
+ Process.kill(sig, File.read(old_pid).to_i)
+ rescue Errno::ENOENT, Errno::ESRCH
+ end
+ end
#
# Throttle the master from forking too quickly by sleeping. Due
# to the implementation of standard Unix signal handlers, this
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab
index 29c9d98965d..6f97643f9e0 100644
--- a/lib/support/init.d/gitlab
+++ b/lib/support/init.d/gitlab
@@ -81,7 +81,7 @@ restart() {
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
echo "Restarting $DESC..."
kill -USR2 `cat $WEB_SERVER_PID`
- execute "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
+ execute "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1"
if [ `whoami` = root ]; then
execute "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
fi