unicorn 5.5.1 → 5.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.manifest +5 -3
  3. data/.olddoc.yml +12 -7
  4. data/Documentation/.gitignore +1 -3
  5. data/Documentation/unicorn.1 +222 -0
  6. data/Documentation/unicorn_rails.1 +207 -0
  7. data/FAQ +1 -1
  8. data/GIT-VERSION-FILE +1 -1
  9. data/GIT-VERSION-GEN +1 -1
  10. data/GNUmakefile +111 -56
  11. data/HACKING +1 -1
  12. data/ISSUES +16 -13
  13. data/KNOWN_ISSUES +2 -2
  14. data/Links +5 -5
  15. data/README +13 -6
  16. data/SIGNALS +1 -1
  17. data/Sandbox +2 -2
  18. data/archive/slrnpull.conf +1 -1
  19. data/examples/big_app_gc.rb +1 -1
  20. data/examples/logrotate.conf +2 -2
  21. data/examples/nginx.conf +1 -1
  22. data/examples/unicorn.conf.minimal.rb +2 -2
  23. data/examples/unicorn.conf.rb +2 -2
  24. data/examples/unicorn@.service +7 -0
  25. data/ext/unicorn_http/extconf.rb +5 -0
  26. data/ext/unicorn_http/unicorn_http.c +253 -215
  27. data/ext/unicorn_http/unicorn_http.rl +43 -5
  28. data/lib/unicorn/configurator.rb +13 -3
  29. data/lib/unicorn/http_request.rb +11 -0
  30. data/lib/unicorn/http_server.rb +36 -4
  31. data/lib/unicorn/oob_gc.rb +2 -2
  32. data/lib/unicorn/tmpio.rb +8 -2
  33. data/lib/unicorn/version.rb +1 -1
  34. data/lib/unicorn.rb +1 -1
  35. data/man/man1/unicorn.1 +89 -88
  36. data/man/man1/unicorn_rails.1 +77 -79
  37. data/t/GNUmakefile +3 -72
  38. data/test/benchmark/README +14 -4
  39. data/test/benchmark/ddstream.ru +50 -0
  40. data/test/benchmark/readinput.ru +40 -0
  41. data/test/benchmark/uconnect.perl +66 -0
  42. data/test/exec/test_exec.rb +9 -7
  43. data/test/test_helper.rb +22 -30
  44. data/test/unit/test_http_parser_ng.rb +81 -0
  45. data/test/unit/test_server.rb +74 -0
  46. data/test/unit/test_upload.rb +4 -9
  47. data/test/unit/test_util.rb +1 -1
  48. data/unicorn.gemspec +8 -7
  49. metadata +12 -9
  50. data/Documentation/GNUmakefile +0 -30
  51. data/Documentation/unicorn.1.txt +0 -187
  52. data/Documentation/unicorn_rails.1.txt +0 -173
@@ -1,173 +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 ancient Rails (2.x and earlier)
16
- applications using Unicorn. Rails 3 (and later) support Rack natively,
17
- so users are encouraged to use unicorn(1) instead of unicorn_rails(1).
18
-
19
- It is expected to be started in your Rails application root (RAILS_ROOT),
20
- but the "working_directory" directive may be used in the CONFIG_FILE.
21
-
22
- The outward interface resembles rackup(1), the internals and default
23
- middleware loading is designed like the `script/server` command
24
- distributed with Rails.
25
-
26
- While Unicorn takes a myriad of command-line options for compatibility
27
- with ruby(1) and rackup(1), it is recommended to stick to the few
28
- command-line options specified in the SYNOPSIS and use the CONFIG_FILE
29
- as much as possible.
30
-
31
- # UNICORN OPTIONS
32
- -c, \--config-file CONFIG_FILE
33
- : Path to the Unicorn-specific config file. The config file is
34
- implemented as a Ruby DSL, so Ruby code may executed.
35
- See the RDoc/ri for the *Unicorn::Configurator* class for the full
36
- list of directives available from the DSL.
37
- Using an absolute path for for CONFIG_FILE is recommended as it
38
- makes multiple instances of Unicorn easily distinguishable when
39
- viewing ps(1) output.
40
-
41
- -D, \--daemonize
42
- : Run daemonized in the background. The process is detached from
43
- the controlling terminal and stdin is redirected to "/dev/null".
44
- Unlike many common UNIX daemons, we do not chdir to \"/\"
45
- upon daemonization to allow more control over the startup/upgrade
46
- process.
47
- Unless specified in the CONFIG_FILE, stderr and stdout will
48
- also be redirected to "/dev/null".
49
- Daemonization will _skip_ loading of the *Rails::Rack::LogTailer*
50
- middleware under Rails \>\= 2.3.x.
51
- By default, unicorn\_rails(1) will create a PID file in
52
- _\"RAILS\_ROOT/tmp/pids/unicorn.pid\"_. You may override this
53
- by specifying the "pid" directive to override this Unicorn config file.
54
-
55
- -E, \--env RAILS_ENV
56
- : Run under the given RAILS_ENV. This sets the RAILS_ENV environment
57
- variable. Acceptable values are exactly those you expect in your Rails
58
- application, typically "development" or "production".
59
-
60
- -l, \--listen ADDRESS
61
- : Listens on a given ADDRESS. ADDRESS may be in the form of
62
- HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket
63
- and PATH is meant to be a path to a UNIX domain socket.
64
- Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080).
65
- For production deployments, specifying the "listen" directive in
66
- CONFIG_FILE is recommended as it allows fine-tuning of socket
67
- options.
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
- \--path PATH
86
- : Mounts the Rails application at the given PATH (instead of "/").
87
- This is equivalent to setting the RAILS_RELATIVE_URL_ROOT
88
- environment variable. This is only supported under Rails 2.3
89
- or later at the moment.
90
-
91
- # RUBY OPTIONS
92
- -e, \--eval LINE
93
- : Evaluate a LINE of Ruby code. This evaluation happens
94
- immediately as the command-line is being parsed.
95
-
96
- -d, \--debug
97
- : Turn on debug mode, the $DEBUG variable is set to true.
98
- For Rails \>\= 2.3.x, this loads the *Rails::Rack::Debugger*
99
- middleware.
100
-
101
- -w, \--warn
102
- : Turn on verbose warnings, the $VERBOSE variable is set to true.
103
-
104
- -I, \--include PATH
105
- : specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH.
106
- The \':\' character may be used to delimit multiple directories.
107
- This directive may be used more than once. Modifications to
108
- $LOAD_PATH take place immediately and in the order they were
109
- specified on the command-line.
110
-
111
- -r, \--require LIBRARY
112
- : require a specified LIBRARY before executing the application. The
113
- \"require\" statement will be executed immediately and in the order
114
- they were specified on the command-line.
115
-
116
- # RACKUP FILE
117
-
118
- This defaults to \"config.ru\" in RAILS_ROOT. It should be the same
119
- file used by rackup(1) and other Rack launchers, it uses the
120
- *Rack::Builder* DSL. Unlike many other Rack applications, RACKUP_FILE
121
- is completely _optional_ for Rails, but may be used to disable some
122
- of the default middleware for performance.
123
-
124
- Embedded command-line options are mostly parsed for compatibility
125
- with rackup(1) but strongly discouraged.
126
-
127
- # ENVIRONMENT VARIABLES
128
-
129
- The RAILS_ENV variable is set by the aforementioned \-E switch. The
130
- RAILS_RELATIVE_URL_ROOT is set by the aforementioned \--path switch.
131
- Either of these variables may also be set in the shell or the Unicorn
132
- CONFIG_FILE. All application or library-specific environment variables
133
- (e.g. TMPDIR, RAILS_ASSET_ID) may always be set in the Unicorn
134
- CONFIG_FILE in addition to the spawning shell. When transparently
135
- upgrading Unicorn, all environment variables set in the old master
136
- process are inherited by the new master process. Unicorn only uses (and
137
- will overwrite) the UNICORN_FD environment variable internally when
138
- doing transparent upgrades.
139
-
140
- # SIGNALS
141
-
142
- The following UNIX signals may be sent to the master process:
143
-
144
- * HUP - reload config file, app, and gracefully restart all workers
145
- * INT/TERM - quick shutdown, kills all workers immediately
146
- * QUIT - graceful shutdown, waits for workers to finish their
147
- current request before finishing.
148
- * USR1 - reopen all logs owned by the master and all workers
149
- See Unicorn::Util.reopen_logs for what is considered a log.
150
- * USR2 - reexecute the running binary. A separate QUIT
151
- should be sent to the original process once the child is verified to
152
- be up and running.
153
- * WINCH - gracefully stops workers but keep the master running.
154
- This will only work for daemonized processes.
155
- * TTIN - increment the number of worker processes by one
156
- * TTOU - decrement the number of worker processes by one
157
-
158
- See the [SIGNALS][4] document for full description of all signals
159
- used by Unicorn.
160
-
161
- # SEE ALSO
162
-
163
- * unicorn(1)
164
- * *Rack::Builder* ri/RDoc
165
- * *Unicorn::Configurator* ri/RDoc
166
- * [Unicorn RDoc][1]
167
- * [Rack RDoc][2]
168
- * [Rackup HowTo][3]
169
-
170
- [1]: https://bogomips.org/unicorn/
171
- [2]: https://www.rubydoc.info/github/rack/rack/
172
- [3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
173
- [4]: https://bogomips.org/unicorn/SIGNALS.html