BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8d6343b3
Commit
8d6343b3
authored
Aug 25, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4860 from gitlabhq/fix_service_gitlab_restart
Fix the `service gitlab restart` command
parents
b1358639
2b9d48cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
unicorn.rb.example
config/unicorn.rb.example
+13
-13
gitlab
lib/support/init.d/gitlab
+1
-1
No files found.
config/unicorn.rb.example
View file @
8d6343b3
...
...
@@ -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
...
...
lib/support/init.d/gitlab
View file @
8d6343b3
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment