unicorn 5.4.1 → 5.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.manifest +7 -3
- data/.olddoc.yml +12 -7
- data/Application_Timeouts +4 -4
- data/Documentation/.gitignore +1 -3
- data/Documentation/unicorn.1 +222 -0
- data/Documentation/unicorn_rails.1 +207 -0
- data/FAQ +1 -1
- data/GIT-VERSION-FILE +1 -1
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +111 -57
- data/HACKING +1 -1
- data/ISSUES +21 -23
- data/KNOWN_ISSUES +2 -2
- data/LATEST +22 -28
- data/LICENSE +2 -2
- data/Links +13 -11
- data/NEWS +65 -0
- data/README +25 -11
- data/SIGNALS +1 -1
- data/Sandbox +4 -4
- data/archive/slrnpull.conf +1 -1
- data/bin/unicorn +3 -1
- data/bin/unicorn_rails +2 -2
- data/examples/big_app_gc.rb +1 -1
- data/examples/logrotate.conf +3 -3
- data/examples/nginx.conf +4 -3
- data/examples/unicorn.conf.minimal.rb +2 -2
- data/examples/unicorn.conf.rb +2 -2
- data/examples/unicorn@.service +7 -0
- data/ext/unicorn_http/common_field_optimization.h +24 -6
- data/ext/unicorn_http/extconf.rb +35 -0
- data/ext/unicorn_http/global_variables.h +2 -2
- data/ext/unicorn_http/httpdate.c +2 -2
- data/ext/unicorn_http/unicorn_http.c +257 -224
- data/ext/unicorn_http/unicorn_http.rl +47 -14
- data/lib/unicorn/configurator.rb +25 -4
- data/lib/unicorn/http_request.rb +12 -2
- data/lib/unicorn/http_server.rb +38 -11
- data/lib/unicorn/launcher.rb +1 -1
- data/lib/unicorn/oob_gc.rb +2 -2
- data/lib/unicorn/socket_helper.rb +1 -0
- data/lib/unicorn/tmpio.rb +8 -2
- data/lib/unicorn/util.rb +1 -1
- data/lib/unicorn/version.rb +1 -1
- data/lib/unicorn/worker.rb +16 -2
- data/lib/unicorn.rb +23 -9
- data/man/man1/unicorn.1 +89 -88
- data/man/man1/unicorn_rails.1 +78 -83
- data/t/GNUmakefile +3 -72
- data/t/README +4 -4
- data/t/t0301-no-default-middleware-ignored-in-config.sh +25 -0
- data/t/t0301.ru +13 -0
- data/test/benchmark/README +14 -4
- data/test/benchmark/ddstream.ru +50 -0
- data/test/benchmark/readinput.ru +40 -0
- data/test/benchmark/uconnect.perl +66 -0
- data/test/exec/test_exec.rb +9 -7
- data/test/test_helper.rb +22 -30
- data/test/unit/test_http_parser.rb +16 -0
- data/test/unit/test_http_parser_ng.rb +81 -0
- data/test/unit/test_server.rb +30 -0
- data/test/unit/test_upload.rb +4 -9
- data/test/unit/test_util.rb +25 -0
- data/unicorn.gemspec +8 -7
- metadata +15 -11
- data/Documentation/GNUmakefile +0 -30
- data/Documentation/unicorn.1.txt +0 -187
- data/Documentation/unicorn_rails.1.txt +0 -175
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- unicorn hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -72,7 +72,7 @@ description: |-
|
|
72
72
|
advantage of features in Unix/Unix-like kernels. Slow clients should
|
73
73
|
only be served by placing a reverse proxy capable of fully buffering
|
74
74
|
both the the request and response in between unicorn and slow clients.
|
75
|
-
email: unicorn-public@
|
75
|
+
email: unicorn-public@yhbt.net
|
76
76
|
executables:
|
77
77
|
- unicorn
|
78
78
|
- unicorn_rails
|
@@ -120,9 +120,8 @@ files:
|
|
120
120
|
- COPYING
|
121
121
|
- DESIGN
|
122
122
|
- Documentation/.gitignore
|
123
|
-
- Documentation/
|
124
|
-
- Documentation/
|
125
|
-
- Documentation/unicorn_rails.1.txt
|
123
|
+
- Documentation/unicorn.1
|
124
|
+
- Documentation/unicorn_rails.1
|
126
125
|
- FAQ
|
127
126
|
- GIT-VERSION-FILE
|
128
127
|
- GIT-VERSION-GEN
|
@@ -238,6 +237,8 @@ files:
|
|
238
237
|
- t/t0116.ru
|
239
238
|
- t/t0200-rack-hijack.sh
|
240
239
|
- t/t0300-no-default-middleware.sh
|
240
|
+
- t/t0301-no-default-middleware-ignored-in-config.sh
|
241
|
+
- t/t0301.ru
|
241
242
|
- t/t9000-preread-input.sh
|
242
243
|
- t/t9001-oob_gc.sh
|
243
244
|
- t/t9002-oob_gc-path.sh
|
@@ -246,7 +247,10 @@ files:
|
|
246
247
|
- test/aggregate.rb
|
247
248
|
- test/benchmark/README
|
248
249
|
- test/benchmark/dd.ru
|
250
|
+
- test/benchmark/ddstream.ru
|
251
|
+
- test/benchmark/readinput.ru
|
249
252
|
- test/benchmark/stack.ru
|
253
|
+
- test/benchmark/uconnect.perl
|
250
254
|
- test/exec/README
|
251
255
|
- test/exec/test_exec.rb
|
252
256
|
- test/test_helper.rb
|
@@ -267,7 +271,7 @@ files:
|
|
267
271
|
- unicorn.gemspec
|
268
272
|
- unicorn_1
|
269
273
|
- unicorn_rails_1
|
270
|
-
homepage: https://
|
274
|
+
homepage: https://yhbt.net/unicorn/
|
271
275
|
licenses:
|
272
276
|
- GPL-2.0+
|
273
277
|
- Ruby-1.8
|
@@ -278,17 +282,16 @@ require_paths:
|
|
278
282
|
- lib
|
279
283
|
required_ruby_version: !ruby/object:Gem::Requirement
|
280
284
|
requirements:
|
281
|
-
- - "
|
285
|
+
- - ">="
|
282
286
|
- !ruby/object:Gem::Version
|
283
|
-
version:
|
287
|
+
version: 1.9.3
|
284
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
285
289
|
requirements:
|
286
290
|
- - ">="
|
287
291
|
- !ruby/object:Gem::Version
|
288
292
|
version: '0'
|
289
293
|
requirements: []
|
290
|
-
|
291
|
-
rubygems_version: 2.7.7
|
294
|
+
rubygems_version: 3.0.2
|
292
295
|
signing_key:
|
293
296
|
specification_version: 4
|
294
297
|
summary: Rack HTTP server for fast clients and Unix
|
@@ -298,4 +301,5 @@ test_files:
|
|
298
301
|
- test/unit/test_http_parser_ng.rb
|
299
302
|
- test/unit/test_request.rb
|
300
303
|
- test/unit/test_server.rb
|
304
|
+
- test/unit/test_upload.rb
|
301
305
|
- test/unit/test_util.rb
|
data/Documentation/GNUmakefile
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
all::
|
2
|
-
|
3
|
-
PANDOC = pandoc
|
4
|
-
PANDOC_OPTS = -f markdown --email-obfuscation=none
|
5
|
-
pandoc = $(PANDOC) $(PANDOC_OPTS)
|
6
|
-
pandoc_html = $(pandoc) --toc -t html --no-wrap
|
7
|
-
|
8
|
-
man1 := $(addsuffix .1,unicorn unicorn_rails)
|
9
|
-
html1 := $(addsuffix .html,$(man1))
|
10
|
-
|
11
|
-
all:: html man
|
12
|
-
|
13
|
-
html: $(html1)
|
14
|
-
man: $(man1)
|
15
|
-
|
16
|
-
install-html: html
|
17
|
-
mkdir -p ../doc/man1
|
18
|
-
install -m 644 $(html1) ../doc/man1
|
19
|
-
|
20
|
-
install-man: man
|
21
|
-
mkdir -p ../man/man1
|
22
|
-
install -m 644 $(man1) ../man/man1
|
23
|
-
|
24
|
-
%.1: %.1.txt
|
25
|
-
$(pandoc) -s -t man < $< > $@+ && mv $@+ $@
|
26
|
-
%.1.html: %.1.txt
|
27
|
-
$(pandoc_html) < $< > $@+ && mv $@+ $@
|
28
|
-
|
29
|
-
clean::
|
30
|
-
$(RM) $(man1) $(html1)
|
data/Documentation/unicorn.1.txt
DELETED
@@ -1,187 +0,0 @@
|
|
1
|
-
% UNICORN(1) Unicorn User Manual
|
2
|
-
% The Unicorn Community <unicorn-public@bogomips.org>
|
3
|
-
% September 15, 2009
|
4
|
-
|
5
|
-
# NAME
|
6
|
-
|
7
|
-
unicorn - a rackup-like command to launch the Unicorn HTTP server
|
8
|
-
|
9
|
-
# SYNOPSIS
|
10
|
-
|
11
|
-
unicorn [-c CONFIG_FILE] [-E RACK_ENV] [-D] [RACKUP_FILE]
|
12
|
-
|
13
|
-
# DESCRIPTION
|
14
|
-
|
15
|
-
A rackup(1)-like command to launch Rack applications using Unicorn.
|
16
|
-
It is expected to be started in your application root (APP_ROOT),
|
17
|
-
but the "working_directory" directive may be used in the CONFIG_FILE.
|
18
|
-
|
19
|
-
While unicorn takes a myriad of command-line options for
|
20
|
-
compatibility with ruby(1) and rackup(1), it is recommended to stick
|
21
|
-
to the few command-line options specified in the SYNOPSIS and use
|
22
|
-
the CONFIG_FILE as much as possible.
|
23
|
-
|
24
|
-
# RACKUP FILE
|
25
|
-
|
26
|
-
This defaults to \"config.ru\" in APP_ROOT. It should be the same
|
27
|
-
file used by rackup(1) and other Rack launchers, it uses the
|
28
|
-
*Rack::Builder* DSL.
|
29
|
-
|
30
|
-
Embedded command-line options are mostly parsed for compatibility
|
31
|
-
with rackup(1) but strongly discouraged.
|
32
|
-
|
33
|
-
# UNICORN OPTIONS
|
34
|
-
-c, \--config-file CONFIG_FILE
|
35
|
-
: Path to the Unicorn-specific config file. The config file is
|
36
|
-
implemented as a Ruby DSL, so Ruby code may executed.
|
37
|
-
See the RDoc/ri for the *Unicorn::Configurator* class for the full
|
38
|
-
list of directives available from the DSL.
|
39
|
-
Using an absolute path for for CONFIG_FILE is recommended as it
|
40
|
-
makes multiple instances of Unicorn easily distinguishable when
|
41
|
-
viewing ps(1) output.
|
42
|
-
|
43
|
-
-D, \--daemonize
|
44
|
-
: Run daemonized in the background. The process is detached from
|
45
|
-
the controlling terminal and stdin is redirected to "/dev/null".
|
46
|
-
Unlike many common UNIX daemons, we do not chdir to \"/\"
|
47
|
-
upon daemonization to allow more control over the startup/upgrade
|
48
|
-
process.
|
49
|
-
Unless specified in the CONFIG_FILE, stderr and stdout will
|
50
|
-
also be redirected to "/dev/null".
|
51
|
-
|
52
|
-
-E, \--env RACK_ENV
|
53
|
-
: Run under the given RACK_ENV. See the RACK ENVIRONMENT section
|
54
|
-
for more details.
|
55
|
-
|
56
|
-
-l, \--listen ADDRESS
|
57
|
-
: Listens on a given ADDRESS. ADDRESS may be in the form of
|
58
|
-
HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket
|
59
|
-
and PATH is meant to be a path to a UNIX domain socket.
|
60
|
-
Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080)
|
61
|
-
For production deployments, specifying the "listen" directive in
|
62
|
-
CONFIG_FILE is recommended as it allows fine-tuning of socket
|
63
|
-
options.
|
64
|
-
-N, \--no-default-middleware
|
65
|
-
: Disables loading middleware implied by RACK_ENV. This bypasses the
|
66
|
-
configuration documented in the RACK ENVIRONMENT section, but still
|
67
|
-
allows RACK_ENV to be used for application/framework-specific purposes.
|
68
|
-
|
69
|
-
# RACKUP COMPATIBILITY OPTIONS
|
70
|
-
-o, \--host HOST
|
71
|
-
: Listen on a TCP socket belonging to HOST, default is
|
72
|
-
"0.0.0.0" (all addresses).
|
73
|
-
If specified multiple times on the command-line, only the
|
74
|
-
last-specified value takes effect.
|
75
|
-
This option only exists for compatibility with the rackup(1) command,
|
76
|
-
use of "-l"/"\--listen" switch is recommended instead.
|
77
|
-
|
78
|
-
-p, \--port PORT
|
79
|
-
: Listen on the specified TCP PORT, default is 8080.
|
80
|
-
If specified multiple times on the command-line, only the last-specified
|
81
|
-
value takes effect.
|
82
|
-
This option only exists for compatibility with the rackup(1) command,
|
83
|
-
use of "-l"/"\--listen" switch is recommended instead.
|
84
|
-
|
85
|
-
-s, \--server SERVER
|
86
|
-
: No-op, this exists only for compatibility with rackup(1).
|
87
|
-
|
88
|
-
# RUBY OPTIONS
|
89
|
-
-e, \--eval LINE
|
90
|
-
: Evaluate a LINE of Ruby code. This evaluation happens
|
91
|
-
immediately as the command-line is being parsed.
|
92
|
-
|
93
|
-
-d, \--debug
|
94
|
-
: Turn on debug mode, the $DEBUG variable is set to true.
|
95
|
-
|
96
|
-
-w, \--warn
|
97
|
-
: Turn on verbose warnings, the $VERBOSE variable is set to true.
|
98
|
-
|
99
|
-
-I, \--include PATH
|
100
|
-
: specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH.
|
101
|
-
The \':\' character may be used to delimit multiple directories.
|
102
|
-
This directive may be used more than once. Modifications to
|
103
|
-
$LOAD_PATH take place immediately and in the order they were
|
104
|
-
specified on the command-line.
|
105
|
-
|
106
|
-
-r, \--require LIBRARY
|
107
|
-
: require a specified LIBRARY before executing the application. The
|
108
|
-
\"require\" statement will be executed immediately and in the order
|
109
|
-
they were specified on the command-line.
|
110
|
-
|
111
|
-
# SIGNALS
|
112
|
-
|
113
|
-
The following UNIX signals may be sent to the master process:
|
114
|
-
|
115
|
-
* HUP - reload config file, app, and gracefully restart all workers
|
116
|
-
* INT/TERM - quick shutdown, kills all workers immediately
|
117
|
-
* QUIT - graceful shutdown, waits for workers to finish their
|
118
|
-
current request before finishing.
|
119
|
-
* USR1 - reopen all logs owned by the master and all workers
|
120
|
-
See Unicorn::Util.reopen_logs for what is considered a log.
|
121
|
-
* USR2 - reexecute the running binary. A separate QUIT
|
122
|
-
should be sent to the original process once the child is verified to
|
123
|
-
be up and running.
|
124
|
-
* WINCH - gracefully stops workers but keep the master running.
|
125
|
-
This will only work for daemonized processes.
|
126
|
-
* TTIN - increment the number of worker processes by one
|
127
|
-
* TTOU - decrement the number of worker processes by one
|
128
|
-
|
129
|
-
See the [SIGNALS][4] document for full description of all signals
|
130
|
-
used by Unicorn.
|
131
|
-
|
132
|
-
# RACK ENVIRONMENT
|
133
|
-
|
134
|
-
Accepted values of RACK_ENV and the middleware they automatically load
|
135
|
-
(outside of RACKUP_FILE) are exactly as those in rackup(1):
|
136
|
-
|
137
|
-
* development - loads Rack::CommonLogger, Rack::ShowExceptions, and
|
138
|
-
Rack::Lint middleware
|
139
|
-
* deployment - loads Rack::CommonLogger middleware
|
140
|
-
* none - loads no middleware at all, relying
|
141
|
-
entirely on RACKUP_FILE
|
142
|
-
|
143
|
-
All unrecognized values for RACK_ENV are assumed to be
|
144
|
-
"none". Production deployments are strongly encouraged to use
|
145
|
-
"deployment" or "none" for maximum performance.
|
146
|
-
|
147
|
-
As of Unicorn 0.94.0, RACK_ENV is exported as a process-wide environment
|
148
|
-
variable as well. While not current a part of the Rack specification as
|
149
|
-
of Rack 1.0.1, this has become a de facto standard in the Rack world.
|
150
|
-
|
151
|
-
Note the Rack::ContentLength and Rack::Chunked middlewares are also
|
152
|
-
loaded by "deployment" and "development", but no other values of
|
153
|
-
RACK_ENV. If needed, they must be individually specified in the
|
154
|
-
RACKUP_FILE, some frameworks do not require them.
|
155
|
-
|
156
|
-
# ENVIRONMENT VARIABLES
|
157
|
-
|
158
|
-
The RACK_ENV variable is set by the aforementioned \-E switch.
|
159
|
-
All application or library-specific environment variables (e.g. TMPDIR)
|
160
|
-
may always be set in the Unicorn CONFIG_FILE in addition to the spawning
|
161
|
-
shell. When transparently upgrading Unicorn, all environment variables
|
162
|
-
set in the old master process are inherited by the new master process.
|
163
|
-
Unicorn only uses (and will overwrite) the UNICORN_FD environment
|
164
|
-
variable internally when doing transparent upgrades.
|
165
|
-
|
166
|
-
UNICORN_FD is a comma-delimited list of one or more file descriptors
|
167
|
-
used to implement USR2 upgrades. Init systems may bind listen sockets
|
168
|
-
itself and spawn unicorn with UNICORN_FD set to the file descriptor
|
169
|
-
numbers of the listen socket(s).
|
170
|
-
|
171
|
-
As of unicorn 5.0, LISTEN_PID and LISTEN_FDS are used for socket
|
172
|
-
activation as documented in the sd_listen_fds(3) manpage. Users
|
173
|
-
relying on this feature do not need to specify a listen socket in
|
174
|
-
the unicorn config file.
|
175
|
-
|
176
|
-
# SEE ALSO
|
177
|
-
|
178
|
-
* *Rack::Builder* ri/RDoc
|
179
|
-
* *Unicorn::Configurator* ri/RDoc
|
180
|
-
* [Unicorn RDoc][1]
|
181
|
-
* [Rack RDoc][2]
|
182
|
-
* [Rackup HowTo][3]
|
183
|
-
|
184
|
-
[1]: https://bogomips.org/unicorn/
|
185
|
-
[2]: http://www.rubydoc.info/github/rack/rack/
|
186
|
-
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
|
187
|
-
[4]: https://bogomips.org/unicorn/SIGNALS.html
|
@@ -1,175 +0,0 @@
|
|
1
|
-
% UNICORN_RAILS(1) Unicorn User Manual
|
2
|
-
% The Unicorn Community <unicorn-public@bogomips.org>
|
3
|
-
% September 17, 2009
|
4
|
-
|
5
|
-
# NAME
|
6
|
-
|
7
|
-
unicorn_rails - unicorn launcher for Rails 1.x and 2.x users
|
8
|
-
|
9
|
-
# SYNOPSIS
|
10
|
-
|
11
|
-
unicorn_rails [-c CONFIG_FILE] [-E RAILS_ENV] [-D] [RACKUP_FILE]
|
12
|
-
|
13
|
-
# DESCRIPTION
|
14
|
-
|
15
|
-
A rackup(1)-like command to launch Rails applications using Unicorn. It
|
16
|
-
is expected to be started in your Rails application root (RAILS_ROOT),
|
17
|
-
but the "working_directory" directive may be used in the CONFIG_FILE.
|
18
|
-
|
19
|
-
It is designed to help Rails 1.x and 2.y users transition to Rack, but
|
20
|
-
it is NOT needed for Rails 3 applications. Rails 3 users are encouraged
|
21
|
-
to use unicorn(1) instead of unicorn_rails(1). Users of Rails 1.x/2.y
|
22
|
-
may also use unicorn(1) instead of unicorn_rails(1).
|
23
|
-
|
24
|
-
The outward interface resembles rackup(1), the internals and default
|
25
|
-
middleware loading is designed like the `script/server` command
|
26
|
-
distributed with Rails.
|
27
|
-
|
28
|
-
While Unicorn takes a myriad of command-line options for compatibility
|
29
|
-
with ruby(1) and rackup(1), it is recommended to stick to the few
|
30
|
-
command-line options specified in the SYNOPSIS and use the CONFIG_FILE
|
31
|
-
as much as possible.
|
32
|
-
|
33
|
-
# UNICORN OPTIONS
|
34
|
-
-c, \--config-file CONFIG_FILE
|
35
|
-
: Path to the Unicorn-specific config file. The config file is
|
36
|
-
implemented as a Ruby DSL, so Ruby code may executed.
|
37
|
-
See the RDoc/ri for the *Unicorn::Configurator* class for the full
|
38
|
-
list of directives available from the DSL.
|
39
|
-
Using an absolute path for for CONFIG_FILE is recommended as it
|
40
|
-
makes multiple instances of Unicorn easily distinguishable when
|
41
|
-
viewing ps(1) output.
|
42
|
-
|
43
|
-
-D, \--daemonize
|
44
|
-
: Run daemonized in the background. The process is detached from
|
45
|
-
the controlling terminal and stdin is redirected to "/dev/null".
|
46
|
-
Unlike many common UNIX daemons, we do not chdir to \"/\"
|
47
|
-
upon daemonization to allow more control over the startup/upgrade
|
48
|
-
process.
|
49
|
-
Unless specified in the CONFIG_FILE, stderr and stdout will
|
50
|
-
also be redirected to "/dev/null".
|
51
|
-
Daemonization will _skip_ loading of the *Rails::Rack::LogTailer*
|
52
|
-
middleware under Rails \>\= 2.3.x.
|
53
|
-
By default, unicorn\_rails(1) will create a PID file in
|
54
|
-
_\"RAILS\_ROOT/tmp/pids/unicorn.pid\"_. You may override this
|
55
|
-
by specifying the "pid" directive to override this Unicorn config file.
|
56
|
-
|
57
|
-
-E, \--env RAILS_ENV
|
58
|
-
: Run under the given RAILS_ENV. This sets the RAILS_ENV environment
|
59
|
-
variable. Acceptable values are exactly those you expect in your Rails
|
60
|
-
application, typically "development" or "production".
|
61
|
-
|
62
|
-
-l, \--listen ADDRESS
|
63
|
-
: Listens on a given ADDRESS. ADDRESS may be in the form of
|
64
|
-
HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket
|
65
|
-
and PATH is meant to be a path to a UNIX domain socket.
|
66
|
-
Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080).
|
67
|
-
For production deployments, specifying the "listen" directive in
|
68
|
-
CONFIG_FILE is recommended as it allows fine-tuning of socket
|
69
|
-
options.
|
70
|
-
|
71
|
-
# RACKUP COMPATIBILITY OPTIONS
|
72
|
-
-o, \--host HOST
|
73
|
-
: Listen on a TCP socket belonging to HOST, default is
|
74
|
-
"0.0.0.0" (all addresses).
|
75
|
-
If specified multiple times on the command-line, only the
|
76
|
-
last-specified value takes effect.
|
77
|
-
This option only exists for compatibility with the rackup(1) command,
|
78
|
-
use of "-l"/"\--listen" switch is recommended instead.
|
79
|
-
|
80
|
-
-p, \--port PORT
|
81
|
-
: Listen on the specified TCP PORT, default is 8080.
|
82
|
-
If specified multiple times on the command-line, only the last-specified
|
83
|
-
value takes effect.
|
84
|
-
This option only exists for compatibility with the rackup(1) command,
|
85
|
-
use of "-l"/"\--listen" switch is recommended instead.
|
86
|
-
|
87
|
-
\--path PATH
|
88
|
-
: Mounts the Rails application at the given PATH (instead of "/").
|
89
|
-
This is equivalent to setting the RAILS_RELATIVE_URL_ROOT
|
90
|
-
environment variable. This is only supported under Rails 2.3
|
91
|
-
or later at the moment.
|
92
|
-
|
93
|
-
# RUBY OPTIONS
|
94
|
-
-e, \--eval LINE
|
95
|
-
: Evaluate a LINE of Ruby code. This evaluation happens
|
96
|
-
immediately as the command-line is being parsed.
|
97
|
-
|
98
|
-
-d, \--debug
|
99
|
-
: Turn on debug mode, the $DEBUG variable is set to true.
|
100
|
-
For Rails \>\= 2.3.x, this loads the *Rails::Rack::Debugger*
|
101
|
-
middleware.
|
102
|
-
|
103
|
-
-w, \--warn
|
104
|
-
: Turn on verbose warnings, the $VERBOSE variable is set to true.
|
105
|
-
|
106
|
-
-I, \--include PATH
|
107
|
-
: specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH.
|
108
|
-
The \':\' character may be used to delimit multiple directories.
|
109
|
-
This directive may be used more than once. Modifications to
|
110
|
-
$LOAD_PATH take place immediately and in the order they were
|
111
|
-
specified on the command-line.
|
112
|
-
|
113
|
-
-r, \--require LIBRARY
|
114
|
-
: require a specified LIBRARY before executing the application. The
|
115
|
-
\"require\" statement will be executed immediately and in the order
|
116
|
-
they were specified on the command-line.
|
117
|
-
|
118
|
-
# RACKUP FILE
|
119
|
-
|
120
|
-
This defaults to \"config.ru\" in RAILS_ROOT. It should be the same
|
121
|
-
file used by rackup(1) and other Rack launchers, it uses the
|
122
|
-
*Rack::Builder* DSL. Unlike many other Rack applications, RACKUP_FILE
|
123
|
-
is completely _optional_ for Rails, but may be used to disable some
|
124
|
-
of the default middleware for performance.
|
125
|
-
|
126
|
-
Embedded command-line options are mostly parsed for compatibility
|
127
|
-
with rackup(1) but strongly discouraged.
|
128
|
-
|
129
|
-
# ENVIRONMENT VARIABLES
|
130
|
-
|
131
|
-
The RAILS_ENV variable is set by the aforementioned \-E switch. The
|
132
|
-
RAILS_RELATIVE_URL_ROOT is set by the aforementioned \--path switch.
|
133
|
-
Either of these variables may also be set in the shell or the Unicorn
|
134
|
-
CONFIG_FILE. All application or library-specific environment variables
|
135
|
-
(e.g. TMPDIR, RAILS_ASSET_ID) may always be set in the Unicorn
|
136
|
-
CONFIG_FILE in addition to the spawning shell. When transparently
|
137
|
-
upgrading Unicorn, all environment variables set in the old master
|
138
|
-
process are inherited by the new master process. Unicorn only uses (and
|
139
|
-
will overwrite) the UNICORN_FD environment variable internally when
|
140
|
-
doing transparent upgrades.
|
141
|
-
|
142
|
-
# SIGNALS
|
143
|
-
|
144
|
-
The following UNIX signals may be sent to the master process:
|
145
|
-
|
146
|
-
* HUP - reload config file, app, and gracefully restart all workers
|
147
|
-
* INT/TERM - quick shutdown, kills all workers immediately
|
148
|
-
* QUIT - graceful shutdown, waits for workers to finish their
|
149
|
-
current request before finishing.
|
150
|
-
* USR1 - reopen all logs owned by the master and all workers
|
151
|
-
See Unicorn::Util.reopen_logs for what is considered a log.
|
152
|
-
* USR2 - reexecute the running binary. A separate QUIT
|
153
|
-
should be sent to the original process once the child is verified to
|
154
|
-
be up and running.
|
155
|
-
* WINCH - gracefully stops workers but keep the master running.
|
156
|
-
This will only work for daemonized processes.
|
157
|
-
* TTIN - increment the number of worker processes by one
|
158
|
-
* TTOU - decrement the number of worker processes by one
|
159
|
-
|
160
|
-
See the [SIGNALS][4] document for full description of all signals
|
161
|
-
used by Unicorn.
|
162
|
-
|
163
|
-
# SEE ALSO
|
164
|
-
|
165
|
-
* unicorn(1)
|
166
|
-
* *Rack::Builder* ri/RDoc
|
167
|
-
* *Unicorn::Configurator* ri/RDoc
|
168
|
-
* [Unicorn RDoc][1]
|
169
|
-
* [Rack RDoc][2]
|
170
|
-
* [Rackup HowTo][3]
|
171
|
-
|
172
|
-
[1]: https://bogomips.org/unicorn/
|
173
|
-
[2]: http://www.rubydoc.info/github/rack/rack/
|
174
|
-
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
|
175
|
-
[4]: https://bogomips.org/unicorn/SIGNALS.html
|