unicorn 5.1.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.olddoc.yml +3 -3
- data/Documentation/unicorn.1.txt +2 -2
- data/Documentation/unicorn_rails.1.txt +2 -2
- data/FAQ +1 -1
- data/GIT-VERSION-FILE +1 -1
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +3 -3
- data/HACKING +1 -1
- data/ISSUES +6 -6
- data/KNOWN_ISSUES +2 -2
- data/Links +2 -2
- data/README +2 -2
- data/SIGNALS +1 -1
- data/Sandbox +3 -2
- data/TODO +0 -2
- data/examples/big_app_gc.rb +1 -1
- data/examples/init.sh +36 -8
- data/examples/logrotate.conf +16 -1
- data/examples/nginx.conf +1 -1
- data/examples/unicorn.conf.minimal.rb +2 -2
- data/examples/unicorn.conf.rb +2 -2
- data/examples/unicorn@.service +5 -0
- data/ext/unicorn_http/unicorn_http.c +641 -342
- data/ext/unicorn_http/unicorn_http_common.rl +1 -1
- data/lib/unicorn/configurator.rb +3 -3
- data/lib/unicorn/http_server.rb +1 -1
- data/lib/unicorn/oob_gc.rb +3 -2
- data/lib/unicorn/version.rb +1 -1
- data/man/man1/unicorn.1 +54 -53
- data/man/man1/unicorn_rails.1 +47 -45
- data/test/unit/test_http_parser.rb +18 -0
- data/unicorn_1 +1 -0
- data/unicorn_rails_1 +1 -0
- metadata +8 -4
data/lib/unicorn/configurator.rb
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
|
4
4
|
# Implements a simple DSL for configuring a unicorn server.
|
5
5
|
#
|
6
|
-
# See
|
7
|
-
#
|
6
|
+
# See https://bogomips.org/unicorn/examples/unicorn.conf.rb and
|
7
|
+
# https://bogomips.org/unicorn/examples/unicorn.conf.minimal.rb
|
8
8
|
# example configuration files. An example config file for use with
|
9
9
|
# nginx is also available at
|
10
|
-
#
|
10
|
+
# https://bogomips.org/unicorn/examples/nginx.conf
|
11
11
|
#
|
12
12
|
# See the link:/TUNING.html document for more information on tuning unicorn.
|
13
13
|
class Unicorn::Configurator
|
data/lib/unicorn/http_server.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# forked worker children.
|
7
7
|
#
|
8
8
|
# Users do not need to know the internals of this class, but reading the
|
9
|
-
# {source}[
|
9
|
+
# {source}[https://bogomips.org/unicorn.git/tree/lib/unicorn/http_server.rb]
|
10
10
|
# is education for programmers wishing to learn how unicorn works.
|
11
11
|
# See Unicorn::Configurator for information on how to configure unicorn.
|
12
12
|
class Unicorn::HttpServer
|
data/lib/unicorn/oob_gc.rb
CHANGED
@@ -43,8 +43,9 @@
|
|
43
43
|
# use Unicorn::OobGC, 2, %r{\A/(?:expensive/foo|more_expensive/foo)}
|
44
44
|
#
|
45
45
|
# Feedback from users of early implementations of this module:
|
46
|
-
# *
|
47
|
-
# *
|
46
|
+
# * https://bogomips.org/unicorn-public/0BFC98E9-072B-47EE-9A70-05478C20141B@lukemelia.com/
|
47
|
+
# * https://bogomips.org/unicorn-public/AANLkTilUbgdyDv9W1bi-s_W6kq9sOhWfmuYkKLoKGOLj@mail.gmail.com/
|
48
|
+
|
48
49
|
module Unicorn::OobGC
|
49
50
|
|
50
51
|
# this pretends to be Rack middleware because it used to be
|
data/lib/unicorn/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Unicorn::Const::UNICORN_VERSION = '5.
|
1
|
+
Unicorn::Const::UNICORN_VERSION = '5.2.0'
|
data/man/man1/unicorn.1
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
.TH UNICORN 1 "September 15, 2009" "Unicorn User Manual"
|
1
|
+
.TH "UNICORN" "1" "September 15, 2009" "Unicorn User Manual" ""
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
|
-
unicorn
|
4
|
+
unicorn \- a rackup\-like command to launch the Unicorn HTTP server
|
5
5
|
.SH SYNOPSIS
|
6
6
|
.PP
|
7
|
-
unicorn [
|
7
|
+
unicorn [\-c CONFIG_FILE] [\-E RACK_ENV] [\-D] [RACKUP_FILE]
|
8
8
|
.SH DESCRIPTION
|
9
9
|
.PP
|
10
|
-
A rackup(1)
|
10
|
+
A rackup(1)\-like command to launch Rack applications using Unicorn.
|
11
11
|
It is expected to be started in your application root (APP_ROOT), but
|
12
12
|
the "working_directory" directive may be used in the CONFIG_FILE.
|
13
13
|
.PP
|
14
|
-
While unicorn takes a myriad of command
|
14
|
+
While unicorn takes a myriad of command\-line options for compatibility
|
15
15
|
with ruby(1) and rackup(1), it is recommended to stick to the few
|
16
|
-
command
|
16
|
+
command\-line options specified in the SYNOPSIS and use the CONFIG_FILE
|
17
17
|
as much as possible.
|
18
18
|
.SH RACKUP FILE
|
19
19
|
.PP
|
@@ -21,12 +21,12 @@ This defaults to "config.ru" in APP_ROOT.
|
|
21
21
|
It should be the same file used by rackup(1) and other Rack launchers,
|
22
22
|
it uses the \f[I]Rack::Builder\f[] DSL.
|
23
23
|
.PP
|
24
|
-
Embedded command
|
24
|
+
Embedded command\-line options are mostly parsed for compatibility with
|
25
25
|
rackup(1) but strongly discouraged.
|
26
26
|
.SH UNICORN OPTIONS
|
27
27
|
.TP
|
28
|
-
.B
|
29
|
-
Path to the Unicorn
|
28
|
+
.B \-c, \-\-config\-file CONFIG_FILE
|
29
|
+
Path to the Unicorn\-specific config file.
|
30
30
|
The config file is implemented as a Ruby DSL, so Ruby code may executed.
|
31
31
|
See the RDoc/ri for the \f[I]Unicorn::Configurator\f[] class for the
|
32
32
|
full list of directives available from the DSL.
|
@@ -36,7 +36,7 @@ output.
|
|
36
36
|
.RS
|
37
37
|
.RE
|
38
38
|
.TP
|
39
|
-
.B
|
39
|
+
.B \-D, \-\-daemonize
|
40
40
|
Run daemonized in the background.
|
41
41
|
The process is detached from the controlling terminal and stdin is
|
42
42
|
redirected to "/dev/null".
|
@@ -47,134 +47,135 @@ redirected to "/dev/null".
|
|
47
47
|
.RS
|
48
48
|
.RE
|
49
49
|
.TP
|
50
|
-
.B
|
50
|
+
.B \-E, \-\-env RACK_ENV
|
51
51
|
Run under the given RACK_ENV.
|
52
52
|
See the RACK ENVIRONMENT section for more details.
|
53
53
|
.RS
|
54
54
|
.RE
|
55
55
|
.TP
|
56
|
-
.B
|
56
|
+
.B \-l, \-\-listen ADDRESS
|
57
57
|
Listens on a given ADDRESS.
|
58
58
|
ADDRESS may be in the form of HOST:PORT or PATH, HOST:PORT is taken to
|
59
59
|
mean a TCP socket and PATH is meant to be a path to a UNIX domain
|
60
60
|
socket.
|
61
61
|
Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080) For
|
62
62
|
production deployments, specifying the "listen" directive in CONFIG_FILE
|
63
|
-
is recommended as it allows fine
|
63
|
+
is recommended as it allows fine\-tuning of socket options.
|
64
64
|
.RS
|
65
65
|
.RE
|
66
66
|
.TP
|
67
|
-
.B
|
67
|
+
.B \-N, \-\-no\-default\-middleware
|
68
68
|
Disables loading middleware implied by RACK_ENV.
|
69
69
|
This bypasses the configuration documented in the RACK ENVIRONMENT
|
70
70
|
section, but still allows RACK_ENV to be used for
|
71
|
-
application/framework
|
71
|
+
application/framework\-specific purposes.
|
72
72
|
.RS
|
73
73
|
.RE
|
74
74
|
.SH RACKUP COMPATIBILITY OPTIONS
|
75
75
|
.TP
|
76
|
-
.B
|
76
|
+
.B \-o, \-\-host HOST
|
77
77
|
Listen on a TCP socket belonging to HOST, default is "0.0.0.0" (all
|
78
78
|
addresses).
|
79
|
-
If specified multiple times on the command
|
80
|
-
value takes effect.
|
79
|
+
If specified multiple times on the command\-line, only the
|
80
|
+
last\-specified value takes effect.
|
81
81
|
This option only exists for compatibility with the rackup(1) command,
|
82
|
-
use of "
|
82
|
+
use of "\-l"/"\-\-listen" switch is recommended instead.
|
83
83
|
.RS
|
84
84
|
.RE
|
85
85
|
.TP
|
86
|
-
.B
|
86
|
+
.B \-p, \-\-port PORT
|
87
87
|
Listen on the specified TCP PORT, default is 8080.
|
88
|
-
If specified multiple times on the command
|
89
|
-
value takes effect.
|
88
|
+
If specified multiple times on the command\-line, only the
|
89
|
+
last\-specified value takes effect.
|
90
90
|
This option only exists for compatibility with the rackup(1) command,
|
91
|
-
use of "
|
91
|
+
use of "\-l"/"\-\-listen" switch is recommended instead.
|
92
92
|
.RS
|
93
93
|
.RE
|
94
94
|
.TP
|
95
|
-
.B
|
96
|
-
No
|
95
|
+
.B \-s, \-\-server SERVER
|
96
|
+
No\-op, this exists only for compatibility with rackup(1).
|
97
97
|
.RS
|
98
98
|
.RE
|
99
99
|
.SH RUBY OPTIONS
|
100
100
|
.TP
|
101
|
-
.B
|
101
|
+
.B \-e, \-\-eval LINE
|
102
102
|
Evaluate a LINE of Ruby code.
|
103
|
-
This evaluation happens immediately as the command
|
103
|
+
This evaluation happens immediately as the command\-line is being
|
104
|
+
parsed.
|
104
105
|
.RS
|
105
106
|
.RE
|
106
107
|
.TP
|
107
|
-
.B
|
108
|
+
.B \-d, \-\-debug
|
108
109
|
Turn on debug mode, the $DEBUG variable is set to true.
|
109
110
|
.RS
|
110
111
|
.RE
|
111
112
|
.TP
|
112
|
-
.B
|
113
|
+
.B \-w, \-\-warn
|
113
114
|
Turn on verbose warnings, the $VERBOSE variable is set to true.
|
114
115
|
.RS
|
115
116
|
.RE
|
116
117
|
.TP
|
117
|
-
.B
|
118
|
-
specify
|
119
|
-
|
118
|
+
.B \-I, \-\-include PATH
|
119
|
+
specify
|
120
|
+
\f[I]L\f[]\f[I]O\f[]\f[I]A\f[]\f[I]D\f[]~\f[I]P\f[]~\f[I]A\f[]\f[I]T\f[]\f[I]H\f[].\f[I]P\f[]\f[I]A\f[]\f[I]T\f[]\f[I]H\f[]\f[I]w\f[]\f[I]i\f[]\f[I]l\f[]\f[I]l\f[]\f[I]b\f[]\f[I]e\f[]\f[I]p\f[]\f[I]r\f[]\f[I]e\f[]\f[I]p\f[]\f[I]e\f[]\f[I]n\f[]\f[I]d\f[]\f[I]e\f[]\f[I]d\f[]\f[I]t\f[]\f[I]o\f[]LOAD_PATH.
|
120
121
|
The \[aq]:\[aq] character may be used to delimit multiple directories.
|
121
122
|
This directive may be used more than once.
|
122
123
|
Modifications to $LOAD_PATH take place immediately and in the order they
|
123
|
-
were specified on the command
|
124
|
+
were specified on the command\-line.
|
124
125
|
.RS
|
125
126
|
.RE
|
126
127
|
.TP
|
127
|
-
.B
|
128
|
+
.B \-r, \-\-require LIBRARY
|
128
129
|
require a specified LIBRARY before executing the application.
|
129
130
|
The "require" statement will be executed immediately and in the order
|
130
|
-
they were specified on the command
|
131
|
+
they were specified on the command\-line.
|
131
132
|
.RS
|
132
133
|
.RE
|
133
134
|
.SH SIGNALS
|
134
135
|
.PP
|
135
136
|
The following UNIX signals may be sent to the master process:
|
136
137
|
.IP \[bu] 2
|
137
|
-
HUP
|
138
|
+
HUP \- reload config file, app, and gracefully restart all workers
|
138
139
|
.IP \[bu] 2
|
139
|
-
INT/TERM
|
140
|
+
INT/TERM \- quick shutdown, kills all workers immediately
|
140
141
|
.IP \[bu] 2
|
141
|
-
QUIT
|
142
|
+
QUIT \- graceful shutdown, waits for workers to finish their current
|
142
143
|
request before finishing.
|
143
144
|
.IP \[bu] 2
|
144
|
-
USR1
|
145
|
+
USR1 \- reopen all logs owned by the master and all workers See
|
145
146
|
Unicorn::Util.reopen_logs for what is considered a log.
|
146
147
|
.IP \[bu] 2
|
147
|
-
USR2
|
148
|
+
USR2 \- reexecute the running binary.
|
148
149
|
A separate QUIT should be sent to the original process once the child is
|
149
150
|
verified to be up and running.
|
150
151
|
.IP \[bu] 2
|
151
|
-
WINCH
|
152
|
+
WINCH \- gracefully stops workers but keep the master running.
|
152
153
|
This will only work for daemonized processes.
|
153
154
|
.IP \[bu] 2
|
154
|
-
TTIN
|
155
|
+
TTIN \- increment the number of worker processes by one
|
155
156
|
.IP \[bu] 2
|
156
|
-
TTOU
|
157
|
+
TTOU \- decrement the number of worker processes by one
|
157
158
|
.PP
|
158
|
-
See the SIGNALS (
|
159
|
+
See the SIGNALS (https://bogomips.org/unicorn/SIGNALS.html) document for
|
159
160
|
full description of all signals used by Unicorn.
|
160
161
|
.SH RACK ENVIRONMENT
|
161
162
|
.PP
|
162
163
|
Accepted values of RACK_ENV and the middleware they automatically load
|
163
164
|
(outside of RACKUP_FILE) are exactly as those in rackup(1):
|
164
165
|
.IP \[bu] 2
|
165
|
-
development
|
166
|
+
development \- loads Rack::CommonLogger, Rack::ShowExceptions, and
|
166
167
|
Rack::Lint middleware
|
167
168
|
.IP \[bu] 2
|
168
|
-
deployment
|
169
|
+
deployment \- loads Rack::CommonLogger middleware
|
169
170
|
.IP \[bu] 2
|
170
|
-
none
|
171
|
+
none \- loads no middleware at all, relying entirely on RACKUP_FILE
|
171
172
|
.PP
|
172
173
|
All unrecognized values for RACK_ENV are assumed to be "none".
|
173
174
|
Production deployments are strongly encouraged to use "deployment" or
|
174
175
|
"none" for maximum performance.
|
175
176
|
.PP
|
176
|
-
As of Unicorn 0.94.0, RACK_ENV is exported as a process
|
177
|
-
variable as well.
|
177
|
+
As of Unicorn 0.94.0, RACK_ENV is exported as a process\-wide
|
178
|
+
environment variable as well.
|
178
179
|
While not current a part of the Rack specification as of Rack 1.0.1,
|
179
180
|
this has become a de facto standard in the Rack world.
|
180
181
|
.PP
|
@@ -185,8 +186,8 @@ If needed, they must be individually specified in the RACKUP_FILE, some
|
|
185
186
|
frameworks do not require them.
|
186
187
|
.SH ENVIRONMENT VARIABLES
|
187
188
|
.PP
|
188
|
-
The RACK_ENV variable is set by the aforementioned
|
189
|
-
All application or library
|
189
|
+
The RACK_ENV variable is set by the aforementioned \-E switch.
|
190
|
+
All application or library\-specific environment variables (e.g.
|
190
191
|
TMPDIR) may always be set in the Unicorn CONFIG_FILE in addition to the
|
191
192
|
spawning shell.
|
192
193
|
When transparently upgrading Unicorn, all environment variables set in
|
@@ -194,7 +195,7 @@ the old master process are inherited by the new master process.
|
|
194
195
|
Unicorn only uses (and will overwrite) the UNICORN_FD environment
|
195
196
|
variable internally when doing transparent upgrades.
|
196
197
|
.PP
|
197
|
-
UNICORN_FD is a comma
|
198
|
+
UNICORN_FD is a comma\-delimited list of one or more file descriptors
|
198
199
|
used to implement USR2 upgrades.
|
199
200
|
Init systems may bind listen sockets itself and spawn unicorn with
|
200
201
|
UNICORN_FD set to the file descriptor numbers of the listen socket(s).
|
@@ -209,7 +210,7 @@ the unicorn config file.
|
|
209
210
|
.IP \[bu] 2
|
210
211
|
\f[I]Unicorn::Configurator\f[] ri/RDoc
|
211
212
|
.IP \[bu] 2
|
212
|
-
Unicorn RDoc (
|
213
|
+
Unicorn RDoc (https://bogomips.org/unicorn/)
|
213
214
|
.IP \[bu] 2
|
214
215
|
Rack RDoc (http://www.rubydoc.info/github/rack/rack/)
|
215
216
|
.IP \[bu] 2
|
data/man/man1/unicorn_rails.1
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
.TH UNICORN_RAILS 1 "September 17, 2009" "Unicorn User Manual"
|
1
|
+
.TH "UNICORN_RAILS" "1" "September 17, 2009" "Unicorn User Manual" ""
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
|
-
unicorn_rails
|
4
|
+
unicorn_rails \- unicorn launcher for Rails 1.x and 2.x users
|
5
5
|
.SH SYNOPSIS
|
6
6
|
.PP
|
7
|
-
unicorn_rails [
|
7
|
+
unicorn_rails [\-c CONFIG_FILE] [\-E RAILS_ENV] [\-D] [RACKUP_FILE]
|
8
8
|
.SH DESCRIPTION
|
9
9
|
.PP
|
10
|
-
A rackup(1)
|
10
|
+
A rackup(1)\-like command to launch Rails applications using Unicorn.
|
11
11
|
It is expected to be started in your Rails application root
|
12
12
|
(RAILS_ROOT), but the "working_directory" directive may be used in the
|
13
13
|
CONFIG_FILE.
|
@@ -23,14 +23,14 @@ The outward interface resembles rackup(1), the internals and default
|
|
23
23
|
middleware loading is designed like the \f[C]script/server\f[] command
|
24
24
|
distributed with Rails.
|
25
25
|
.PP
|
26
|
-
While Unicorn takes a myriad of command
|
26
|
+
While Unicorn takes a myriad of command\-line options for compatibility
|
27
27
|
with ruby(1) and rackup(1), it is recommended to stick to the few
|
28
|
-
command
|
28
|
+
command\-line options specified in the SYNOPSIS and use the CONFIG_FILE
|
29
29
|
as much as possible.
|
30
30
|
.SH UNICORN OPTIONS
|
31
31
|
.TP
|
32
|
-
.B
|
33
|
-
Path to the Unicorn
|
32
|
+
.B \-c, \-\-config\-file CONFIG_FILE
|
33
|
+
Path to the Unicorn\-specific config file.
|
34
34
|
The config file is implemented as a Ruby DSL, so Ruby code may executed.
|
35
35
|
See the RDoc/ri for the \f[I]Unicorn::Configurator\f[] class for the
|
36
36
|
full list of directives available from the DSL.
|
@@ -40,7 +40,7 @@ output.
|
|
40
40
|
.RS
|
41
41
|
.RE
|
42
42
|
.TP
|
43
|
-
.B
|
43
|
+
.B \-D, \-\-daemonize
|
44
44
|
Run daemonized in the background.
|
45
45
|
The process is detached from the controlling terminal and stdin is
|
46
46
|
redirected to "/dev/null".
|
@@ -57,7 +57,7 @@ Unicorn config file.
|
|
57
57
|
.RS
|
58
58
|
.RE
|
59
59
|
.TP
|
60
|
-
.B
|
60
|
+
.B \-E, \-\-env RAILS_ENV
|
61
61
|
Run under the given RAILS_ENV.
|
62
62
|
This sets the RAILS_ENV environment variable.
|
63
63
|
Acceptable values are exactly those you expect in your Rails
|
@@ -65,38 +65,38 @@ application, typically "development" or "production".
|
|
65
65
|
.RS
|
66
66
|
.RE
|
67
67
|
.TP
|
68
|
-
.B
|
68
|
+
.B \-l, \-\-listen ADDRESS
|
69
69
|
Listens on a given ADDRESS.
|
70
70
|
ADDRESS may be in the form of HOST:PORT or PATH, HOST:PORT is taken to
|
71
71
|
mean a TCP socket and PATH is meant to be a path to a UNIX domain
|
72
72
|
socket.
|
73
73
|
Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080).
|
74
74
|
For production deployments, specifying the "listen" directive in
|
75
|
-
CONFIG_FILE is recommended as it allows fine
|
75
|
+
CONFIG_FILE is recommended as it allows fine\-tuning of socket options.
|
76
76
|
.RS
|
77
77
|
.RE
|
78
78
|
.SH RACKUP COMPATIBILITY OPTIONS
|
79
79
|
.TP
|
80
|
-
.B
|
80
|
+
.B \-o, \-\-host HOST
|
81
81
|
Listen on a TCP socket belonging to HOST, default is "0.0.0.0" (all
|
82
82
|
addresses).
|
83
|
-
If specified multiple times on the command
|
84
|
-
value takes effect.
|
83
|
+
If specified multiple times on the command\-line, only the
|
84
|
+
last\-specified value takes effect.
|
85
85
|
This option only exists for compatibility with the rackup(1) command,
|
86
|
-
use of "
|
86
|
+
use of "\-l"/"\-\-listen" switch is recommended instead.
|
87
87
|
.RS
|
88
88
|
.RE
|
89
89
|
.TP
|
90
|
-
.B
|
90
|
+
.B \-p, \-\-port PORT
|
91
91
|
Listen on the specified TCP PORT, default is 8080.
|
92
|
-
If specified multiple times on the command
|
93
|
-
value takes effect.
|
92
|
+
If specified multiple times on the command\-line, only the
|
93
|
+
last\-specified value takes effect.
|
94
94
|
This option only exists for compatibility with the rackup(1) command,
|
95
|
-
use of "
|
95
|
+
use of "\-l"/"\-\-listen" switch is recommended instead.
|
96
96
|
.RS
|
97
97
|
.RE
|
98
98
|
.TP
|
99
|
-
.B
|
99
|
+
.B \-\-path PATH
|
100
100
|
Mounts the Rails application at the given PATH (instead of "/").
|
101
101
|
This is equivalent to setting the RAILS_RELATIVE_URL_ROOT environment
|
102
102
|
variable.
|
@@ -105,38 +105,39 @@ This is only supported under Rails 2.3 or later at the moment.
|
|
105
105
|
.RE
|
106
106
|
.SH RUBY OPTIONS
|
107
107
|
.TP
|
108
|
-
.B
|
108
|
+
.B \-e, \-\-eval LINE
|
109
109
|
Evaluate a LINE of Ruby code.
|
110
|
-
This evaluation happens immediately as the command
|
110
|
+
This evaluation happens immediately as the command\-line is being
|
111
|
+
parsed.
|
111
112
|
.RS
|
112
113
|
.RE
|
113
114
|
.TP
|
114
|
-
.B
|
115
|
+
.B \-d, \-\-debug
|
115
116
|
Turn on debug mode, the $DEBUG variable is set to true.
|
116
117
|
For Rails >= 2.3.x, this loads the \f[I]Rails::Rack::Debugger\f[]
|
117
118
|
middleware.
|
118
119
|
.RS
|
119
120
|
.RE
|
120
121
|
.TP
|
121
|
-
.B
|
122
|
+
.B \-w, \-\-warn
|
122
123
|
Turn on verbose warnings, the $VERBOSE variable is set to true.
|
123
124
|
.RS
|
124
125
|
.RE
|
125
126
|
.TP
|
126
|
-
.B
|
127
|
-
specify
|
128
|
-
|
127
|
+
.B \-I, \-\-include PATH
|
128
|
+
specify
|
129
|
+
\f[I]L\f[]\f[I]O\f[]\f[I]A\f[]\f[I]D\f[]~\f[I]P\f[]~\f[I]A\f[]\f[I]T\f[]\f[I]H\f[].\f[I]P\f[]\f[I]A\f[]\f[I]T\f[]\f[I]H\f[]\f[I]w\f[]\f[I]i\f[]\f[I]l\f[]\f[I]l\f[]\f[I]b\f[]\f[I]e\f[]\f[I]p\f[]\f[I]r\f[]\f[I]e\f[]\f[I]p\f[]\f[I]e\f[]\f[I]n\f[]\f[I]d\f[]\f[I]e\f[]\f[I]d\f[]\f[I]t\f[]\f[I]o\f[]LOAD_PATH.
|
129
130
|
The \[aq]:\[aq] character may be used to delimit multiple directories.
|
130
131
|
This directive may be used more than once.
|
131
132
|
Modifications to $LOAD_PATH take place immediately and in the order they
|
132
|
-
were specified on the command
|
133
|
+
were specified on the command\-line.
|
133
134
|
.RS
|
134
135
|
.RE
|
135
136
|
.TP
|
136
|
-
.B
|
137
|
+
.B \-r, \-\-require LIBRARY
|
137
138
|
require a specified LIBRARY before executing the application.
|
138
139
|
The "require" statement will be executed immediately and in the order
|
139
|
-
they were specified on the command
|
140
|
+
they were specified on the command\-line.
|
140
141
|
.RS
|
141
142
|
.RE
|
142
143
|
.SH RACKUP FILE
|
@@ -148,15 +149,16 @@ Unlike many other Rack applications, RACKUP_FILE is completely
|
|
148
149
|
\f[I]optional\f[] for Rails, but may be used to disable some of the
|
149
150
|
default middleware for performance.
|
150
151
|
.PP
|
151
|
-
Embedded command
|
152
|
+
Embedded command\-line options are mostly parsed for compatibility with
|
152
153
|
rackup(1) but strongly discouraged.
|
153
154
|
.SH ENVIRONMENT VARIABLES
|
154
155
|
.PP
|
155
|
-
The RAILS_ENV variable is set by the aforementioned
|
156
|
-
The RAILS_RELATIVE_URL_ROOT is set by the aforementioned
|
156
|
+
The RAILS_ENV variable is set by the aforementioned \-E switch.
|
157
|
+
The RAILS_RELATIVE_URL_ROOT is set by the aforementioned \-\-path
|
158
|
+
switch.
|
157
159
|
Either of these variables may also be set in the shell or the Unicorn
|
158
160
|
CONFIG_FILE.
|
159
|
-
All application or library
|
161
|
+
All application or library\-specific environment variables (e.g.
|
160
162
|
TMPDIR, RAILS_ASSET_ID) may always be set in the Unicorn CONFIG_FILE in
|
161
163
|
addition to the spawning shell.
|
162
164
|
When transparently upgrading Unicorn, all environment variables set in
|
@@ -167,28 +169,28 @@ variable internally when doing transparent upgrades.
|
|
167
169
|
.PP
|
168
170
|
The following UNIX signals may be sent to the master process:
|
169
171
|
.IP \[bu] 2
|
170
|
-
HUP
|
172
|
+
HUP \- reload config file, app, and gracefully restart all workers
|
171
173
|
.IP \[bu] 2
|
172
|
-
INT/TERM
|
174
|
+
INT/TERM \- quick shutdown, kills all workers immediately
|
173
175
|
.IP \[bu] 2
|
174
|
-
QUIT
|
176
|
+
QUIT \- graceful shutdown, waits for workers to finish their current
|
175
177
|
request before finishing.
|
176
178
|
.IP \[bu] 2
|
177
|
-
USR1
|
179
|
+
USR1 \- reopen all logs owned by the master and all workers See
|
178
180
|
Unicorn::Util.reopen_logs for what is considered a log.
|
179
181
|
.IP \[bu] 2
|
180
|
-
USR2
|
182
|
+
USR2 \- reexecute the running binary.
|
181
183
|
A separate QUIT should be sent to the original process once the child is
|
182
184
|
verified to be up and running.
|
183
185
|
.IP \[bu] 2
|
184
|
-
WINCH
|
186
|
+
WINCH \- gracefully stops workers but keep the master running.
|
185
187
|
This will only work for daemonized processes.
|
186
188
|
.IP \[bu] 2
|
187
|
-
TTIN
|
189
|
+
TTIN \- increment the number of worker processes by one
|
188
190
|
.IP \[bu] 2
|
189
|
-
TTOU
|
191
|
+
TTOU \- decrement the number of worker processes by one
|
190
192
|
.PP
|
191
|
-
See the SIGNALS (
|
193
|
+
See the SIGNALS (https://bogomips.org/unicorn/SIGNALS.html) document for
|
192
194
|
full description of all signals used by Unicorn.
|
193
195
|
.SH SEE ALSO
|
194
196
|
.IP \[bu] 2
|
@@ -198,7 +200,7 @@ unicorn(1)
|
|
198
200
|
.IP \[bu] 2
|
199
201
|
\f[I]Unicorn::Configurator\f[] ri/RDoc
|
200
202
|
.IP \[bu] 2
|
201
|
-
Unicorn RDoc (
|
203
|
+
Unicorn RDoc (https://bogomips.org/unicorn/)
|
202
204
|
.IP \[bu] 2
|
203
205
|
Rack RDoc (http://www.rubydoc.info/github/rack/rack/)
|
204
206
|
.IP \[bu] 2
|