Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
config/unicorn.rb.example
config/unicorn.rb.example
+13
-13
lib/support/init.d/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|
...
@@ -64,19 +64,19 @@ before_fork do |server, worker|
# installations. It is not needed if your system can house
# installations. It is not needed if your system can house
# twice as many worker_processes as you have configured.
# twice as many worker_processes as you have configured.
#
#
#
#
This allows a new master process to incrementally
# This allows a new master process to incrementally
#
#
phase out the old master process with SIGTTOU to avoid a
# phase out the old master process with SIGTTOU to avoid a
#
#
thundering herd (especially in the "preload_app false" case)
# thundering herd (especially in the "preload_app false" case)
#
#
when doing a transparent upgrade. The last worker spawned
# when doing a transparent upgrade. The last worker spawned
#
#
will then kill off the old master process with a SIGQUIT.
# will then kill off the old master process with a SIGQUIT.
#
old_pid = "#{server.config[:pid]}.oldbin"
old_pid = "#{server.config[:pid]}.oldbin"
#
if old_pid != server.pid
if old_pid != server.pid
#
begin
begin
#
sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
#
Process.kill(sig, File.read(old_pid).to_i)
Process.kill(sig, File.read(old_pid).to_i)
#
rescue Errno::ENOENT, Errno::ESRCH
rescue Errno::ENOENT, Errno::ESRCH
#
end
end
#
end
end
#
#
# Throttle the master from forking too quickly by sleeping. Due
# Throttle the master from forking too quickly by sleeping. Due
# to the implementation of standard Unix signal handlers, this
# to the implementation of standard Unix signal handlers, this
...
...
lib/support/init.d/gitlab
View file @
8d6343b3
...
@@ -81,7 +81,7 @@ restart() {
...
@@ -81,7 +81,7 @@ restart() {
if
[
"
$PID
"
-ne
0
-a
"
$STATUS
"
-ne
0
]
;
then
if
[
"
$PID
"
-ne
0
-a
"
$STATUS
"
-ne
0
]
;
then
echo
"Restarting
$DESC
..."
echo
"Restarting
$DESC
..."
kill
-USR2
`
cat
$WEB_SERVER_PID
`
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
if
[
`
whoami
`
=
root
]
;
then
execute
"mkdir -p
$PID_PATH
&&
$START_SIDEKIQ
> /dev/null 2>&1 &"
execute
"mkdir -p
$PID_PATH
&&
$START_SIDEKIQ
> /dev/null 2>&1 &"
fi
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