unicorn-simon 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. checksums.yaml +7 -0
  2. data/.CHANGELOG.old +25 -0
  3. data/.document +28 -0
  4. data/.gitattributes +5 -0
  5. data/.gitignore +25 -0
  6. data/.mailmap +26 -0
  7. data/.manifest +156 -0
  8. data/.olddoc.yml +18 -0
  9. data/Application_Timeouts +77 -0
  10. data/CONTRIBUTORS +35 -0
  11. data/COPYING +674 -0
  12. data/DESIGN +95 -0
  13. data/Documentation/.gitignore +5 -0
  14. data/Documentation/GNUmakefile +30 -0
  15. data/Documentation/unicorn.1.txt +187 -0
  16. data/Documentation/unicorn_rails.1.txt +175 -0
  17. data/FAQ +70 -0
  18. data/GIT-VERSION-FILE +1 -0
  19. data/GIT-VERSION-GEN +39 -0
  20. data/GNUmakefile +253 -0
  21. data/HACKING +120 -0
  22. data/ISSUES +90 -0
  23. data/KNOWN_ISSUES +79 -0
  24. data/LATEST +30 -0
  25. data/LICENSE +67 -0
  26. data/Links +56 -0
  27. data/NEWS +2465 -0
  28. data/PHILOSOPHY +139 -0
  29. data/README +138 -0
  30. data/Rakefile +16 -0
  31. data/SIGNALS +123 -0
  32. data/Sandbox +104 -0
  33. data/TODO +3 -0
  34. data/TUNING +119 -0
  35. data/archive/.gitignore +3 -0
  36. data/archive/slrnpull.conf +4 -0
  37. data/bin/unicorn +126 -0
  38. data/bin/unicorn_rails +209 -0
  39. data/examples/big_app_gc.rb +2 -0
  40. data/examples/echo.ru +27 -0
  41. data/examples/init.sh +102 -0
  42. data/examples/logger_mp_safe.rb +25 -0
  43. data/examples/logrotate.conf +44 -0
  44. data/examples/nginx.conf +155 -0
  45. data/examples/unicorn.conf.minimal.rb +13 -0
  46. data/examples/unicorn.conf.rb +110 -0
  47. data/examples/unicorn.socket +11 -0
  48. data/examples/unicorn@.service +33 -0
  49. data/ext/unicorn_http/CFLAGS +13 -0
  50. data/ext/unicorn_http/c_util.h +124 -0
  51. data/ext/unicorn_http/common_field_optimization.h +111 -0
  52. data/ext/unicorn_http/ext_help.h +62 -0
  53. data/ext/unicorn_http/extconf.rb +11 -0
  54. data/ext/unicorn_http/global_variables.h +97 -0
  55. data/ext/unicorn_http/httpdate.c +78 -0
  56. data/ext/unicorn_http/unicorn_http.c +4274 -0
  57. data/ext/unicorn_http/unicorn_http.rl +980 -0
  58. data/ext/unicorn_http/unicorn_http_common.rl +76 -0
  59. data/lib/unicorn/app/old_rails/static.rb +59 -0
  60. data/lib/unicorn/app/old_rails.rb +35 -0
  61. data/lib/unicorn/cgi_wrapper.rb +147 -0
  62. data/lib/unicorn/configurator.rb +664 -0
  63. data/lib/unicorn/const.rb +21 -0
  64. data/lib/unicorn/http_request.rb +122 -0
  65. data/lib/unicorn/http_response.rb +60 -0
  66. data/lib/unicorn/http_server.rb +824 -0
  67. data/lib/unicorn/launcher.rb +62 -0
  68. data/lib/unicorn/oob_gc.rb +82 -0
  69. data/lib/unicorn/preread_input.rb +33 -0
  70. data/lib/unicorn/socket_helper.rb +195 -0
  71. data/lib/unicorn/stream_input.rb +146 -0
  72. data/lib/unicorn/tee_input.rb +133 -0
  73. data/lib/unicorn/tmpio.rb +27 -0
  74. data/lib/unicorn/util.rb +90 -0
  75. data/lib/unicorn/version.rb +1 -0
  76. data/lib/unicorn/worker.rb +140 -0
  77. data/lib/unicorn.rb +123 -0
  78. data/man/man1/unicorn.1 +221 -0
  79. data/man/man1/unicorn_rails.1 +212 -0
  80. data/setup.rb +1586 -0
  81. data/t/.gitignore +4 -0
  82. data/t/GNUmakefile +74 -0
  83. data/t/README +42 -0
  84. data/t/bin/content-md5-put +36 -0
  85. data/t/bin/sha1sum.rb +17 -0
  86. data/t/bin/unused_listen +40 -0
  87. data/t/broken-app.ru +12 -0
  88. data/t/detach.ru +11 -0
  89. data/t/env.ru +3 -0
  90. data/t/fails-rack-lint.ru +5 -0
  91. data/t/heartbeat-timeout.ru +12 -0
  92. data/t/hijack.ru +43 -0
  93. data/t/listener_names.ru +4 -0
  94. data/t/my-tap-lib.sh +201 -0
  95. data/t/oob_gc.ru +20 -0
  96. data/t/oob_gc_path.ru +20 -0
  97. data/t/pid.ru +3 -0
  98. data/t/preread_input.ru +17 -0
  99. data/t/rack-input-tests.ru +21 -0
  100. data/t/t0000-http-basic.sh +50 -0
  101. data/t/t0001-reload-bad-config.sh +53 -0
  102. data/t/t0002-config-conflict.sh +49 -0
  103. data/t/t0002-parser-error.sh +94 -0
  104. data/t/t0003-working_directory.sh +51 -0
  105. data/t/t0004-heartbeat-timeout.sh +69 -0
  106. data/t/t0004-working_directory_broken.sh +24 -0
  107. data/t/t0005-working_directory_app.rb.sh +40 -0
  108. data/t/t0006-reopen-logs.sh +83 -0
  109. data/t/t0006.ru +13 -0
  110. data/t/t0007-working_directory_no_embed_cli.sh +44 -0
  111. data/t/t0008-back_out_of_upgrade.sh +110 -0
  112. data/t/t0009-broken-app.sh +56 -0
  113. data/t/t0009-winch_ttin.sh +59 -0
  114. data/t/t0010-reap-logging.sh +55 -0
  115. data/t/t0011-active-unix-socket.sh +79 -0
  116. data/t/t0012-reload-empty-config.sh +85 -0
  117. data/t/t0013-rewindable-input-false.sh +24 -0
  118. data/t/t0013.ru +12 -0
  119. data/t/t0014-rewindable-input-true.sh +24 -0
  120. data/t/t0014.ru +12 -0
  121. data/t/t0015-configurator-internals.sh +25 -0
  122. data/t/t0018-write-on-close.sh +23 -0
  123. data/t/t0019-max_header_len.sh +49 -0
  124. data/t/t0020-at_exit-handler.sh +49 -0
  125. data/t/t0021-process_detach.sh +29 -0
  126. data/t/t0022-listener_names-preload_app.sh +32 -0
  127. data/t/t0100-rack-input-tests.sh +124 -0
  128. data/t/t0116-client_body_buffer_size.sh +80 -0
  129. data/t/t0116.ru +16 -0
  130. data/t/t0200-rack-hijack.sh +30 -0
  131. data/t/t0300-no-default-middleware.sh +20 -0
  132. data/t/t9000-preread-input.sh +48 -0
  133. data/t/t9001-oob_gc.sh +47 -0
  134. data/t/t9002-oob_gc-path.sh +75 -0
  135. data/t/test-lib.sh +128 -0
  136. data/t/write-on-close.ru +11 -0
  137. data/test/aggregate.rb +15 -0
  138. data/test/benchmark/README +50 -0
  139. data/test/benchmark/dd.ru +18 -0
  140. data/test/benchmark/stack.ru +8 -0
  141. data/test/exec/README +5 -0
  142. data/test/exec/test_exec.rb +1099 -0
  143. data/test/test_helper.rb +298 -0
  144. data/test/unit/test_configurator.rb +175 -0
  145. data/test/unit/test_droplet.rb +28 -0
  146. data/test/unit/test_http_parser.rb +886 -0
  147. data/test/unit/test_http_parser_ng.rb +633 -0
  148. data/test/unit/test_request.rb +182 -0
  149. data/test/unit/test_response.rb +111 -0
  150. data/test/unit/test_server.rb +268 -0
  151. data/test/unit/test_signals.rb +188 -0
  152. data/test/unit/test_socket_helper.rb +197 -0
  153. data/test/unit/test_stream_input.rb +203 -0
  154. data/test/unit/test_tee_input.rb +304 -0
  155. data/test/unit/test_upload.rb +306 -0
  156. data/test/unit/test_util.rb +105 -0
  157. data/unicorn.gemspec +50 -0
  158. metadata +310 -0
@@ -0,0 +1,212 @@
1
+ .\" Automatically generated by Pandoc 1.19.2.1
2
+ .\"
3
+ .TH "UNICORN_RAILS" "1" "September 17, 2009" "Unicorn User Manual" ""
4
+ .hy
5
+ .SH NAME
6
+ .PP
7
+ unicorn_rails \- unicorn launcher for Rails 1.x and 2.x users
8
+ .SH SYNOPSIS
9
+ .PP
10
+ unicorn_rails [\-c CONFIG_FILE] [\-E RAILS_ENV] [\-D] [RACKUP_FILE]
11
+ .SH DESCRIPTION
12
+ .PP
13
+ A rackup(1)\-like command to launch Rails applications using Unicorn.
14
+ It is expected to be started in your Rails application root
15
+ (RAILS_ROOT), but the "working_directory" directive may be used in the
16
+ CONFIG_FILE.
17
+ .PP
18
+ It is designed to help Rails 1.x and 2.y users transition to Rack, but
19
+ it is NOT needed for Rails 3 applications.
20
+ Rails 3 users are encouraged to use unicorn(1) instead of
21
+ unicorn_rails(1).
22
+ Users of Rails 1.x/2.y may also use unicorn(1) instead of
23
+ unicorn_rails(1).
24
+ .PP
25
+ The outward interface resembles rackup(1), the internals and default
26
+ middleware loading is designed like the \f[C]script/server\f[] command
27
+ distributed with Rails.
28
+ .PP
29
+ While Unicorn takes a myriad of command\-line options for compatibility
30
+ with ruby(1) and rackup(1), it is recommended to stick to the few
31
+ command\-line options specified in the SYNOPSIS and use the CONFIG_FILE
32
+ as much as possible.
33
+ .SH UNICORN OPTIONS
34
+ .TP
35
+ .B \-c, \-\-config\-file CONFIG_FILE
36
+ Path to the Unicorn\-specific config file.
37
+ The config file is implemented as a Ruby DSL, so Ruby code may executed.
38
+ See the RDoc/ri for the \f[I]Unicorn::Configurator\f[] class for the
39
+ full list of directives available from the DSL.
40
+ Using an absolute path for for CONFIG_FILE is recommended as it makes
41
+ multiple instances of Unicorn easily distinguishable when viewing ps(1)
42
+ output.
43
+ .RS
44
+ .RE
45
+ .TP
46
+ .B \-D, \-\-daemonize
47
+ Run daemonized in the background.
48
+ The process is detached from the controlling terminal and stdin is
49
+ redirected to "/dev/null".
50
+ Unlike many common UNIX daemons, we do not chdir to "/" upon
51
+ daemonization to allow more control over the startup/upgrade process.
52
+ Unless specified in the CONFIG_FILE, stderr and stdout will also be
53
+ redirected to "/dev/null".
54
+ Daemonization will \f[I]skip\f[] loading of the
55
+ \f[I]Rails::Rack::LogTailer\f[] middleware under Rails >= 2.3.x.
56
+ By default, unicorn_rails(1) will create a PID file in
57
+ \f[I]"RAILS_ROOT/tmp/pids/unicorn.pid"\f[].
58
+ You may override this by specifying the "pid" directive to override this
59
+ Unicorn config file.
60
+ .RS
61
+ .RE
62
+ .TP
63
+ .B \-E, \-\-env RAILS_ENV
64
+ Run under the given RAILS_ENV.
65
+ This sets the RAILS_ENV environment variable.
66
+ Acceptable values are exactly those you expect in your Rails
67
+ application, typically "development" or "production".
68
+ .RS
69
+ .RE
70
+ .TP
71
+ .B \-l, \-\-listen ADDRESS
72
+ Listens on a given ADDRESS.
73
+ ADDRESS may be in the form of HOST:PORT or PATH, HOST:PORT is taken to
74
+ mean a TCP socket and PATH is meant to be a path to a UNIX domain
75
+ socket.
76
+ Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080).
77
+ For production deployments, specifying the "listen" directive in
78
+ CONFIG_FILE is recommended as it allows fine\-tuning of socket options.
79
+ .RS
80
+ .RE
81
+ .SH RACKUP COMPATIBILITY OPTIONS
82
+ .TP
83
+ .B \-o, \-\-host HOST
84
+ Listen on a TCP socket belonging to HOST, default is "0.0.0.0" (all
85
+ addresses).
86
+ If specified multiple times on the command\-line, only the
87
+ last\-specified value takes effect.
88
+ This option only exists for compatibility with the rackup(1) command,
89
+ use of "\-l"/"\-\-listen" switch is recommended instead.
90
+ .RS
91
+ .RE
92
+ .TP
93
+ .B \-p, \-\-port PORT
94
+ Listen on the specified TCP PORT, default is 8080.
95
+ If specified multiple times on the command\-line, only the
96
+ last\-specified value takes effect.
97
+ This option only exists for compatibility with the rackup(1) command,
98
+ use of "\-l"/"\-\-listen" switch is recommended instead.
99
+ .RS
100
+ .RE
101
+ .TP
102
+ .B \-\-path PATH
103
+ Mounts the Rails application at the given PATH (instead of "/").
104
+ This is equivalent to setting the RAILS_RELATIVE_URL_ROOT environment
105
+ variable.
106
+ This is only supported under Rails 2.3 or later at the moment.
107
+ .RS
108
+ .RE
109
+ .SH RUBY OPTIONS
110
+ .TP
111
+ .B \-e, \-\-eval LINE
112
+ Evaluate a LINE of Ruby code.
113
+ This evaluation happens immediately as the command\-line is being
114
+ parsed.
115
+ .RS
116
+ .RE
117
+ .TP
118
+ .B \-d, \-\-debug
119
+ Turn on debug mode, the $DEBUG variable is set to true.
120
+ For Rails >= 2.3.x, this loads the \f[I]Rails::Rack::Debugger\f[]
121
+ middleware.
122
+ .RS
123
+ .RE
124
+ .TP
125
+ .B \-w, \-\-warn
126
+ Turn on verbose warnings, the $VERBOSE variable is set to true.
127
+ .RS
128
+ .RE
129
+ .TP
130
+ .B \-I, \-\-include PATH
131
+ specify $LOAD_PATH.
132
+ PATH will be prepended to $LOAD_PATH.
133
+ The \[aq]:\[aq] character may be used to delimit multiple directories.
134
+ This directive may be used more than once.
135
+ Modifications to $LOAD_PATH take place immediately and in the order they
136
+ were specified on the command\-line.
137
+ .RS
138
+ .RE
139
+ .TP
140
+ .B \-r, \-\-require LIBRARY
141
+ require a specified LIBRARY before executing the application.
142
+ The "require" statement will be executed immediately and in the order
143
+ they were specified on the command\-line.
144
+ .RS
145
+ .RE
146
+ .SH RACKUP FILE
147
+ .PP
148
+ This defaults to "config.ru" in RAILS_ROOT.
149
+ It should be the same file used by rackup(1) and other Rack launchers,
150
+ it uses the \f[I]Rack::Builder\f[] DSL.
151
+ Unlike many other Rack applications, RACKUP_FILE is completely
152
+ \f[I]optional\f[] for Rails, but may be used to disable some of the
153
+ default middleware for performance.
154
+ .PP
155
+ Embedded command\-line options are mostly parsed for compatibility with
156
+ rackup(1) but strongly discouraged.
157
+ .SH ENVIRONMENT VARIABLES
158
+ .PP
159
+ The RAILS_ENV variable is set by the aforementioned \-E switch.
160
+ The RAILS_RELATIVE_URL_ROOT is set by the aforementioned \-\-path
161
+ switch.
162
+ Either of these variables may also be set in the shell or the Unicorn
163
+ CONFIG_FILE.
164
+ All application or library\-specific environment variables (e.g.
165
+ TMPDIR, RAILS_ASSET_ID) may always be set in the Unicorn CONFIG_FILE in
166
+ addition to the spawning shell.
167
+ When transparently upgrading Unicorn, all environment variables set in
168
+ the old master process are inherited by the new master process.
169
+ Unicorn only uses (and will overwrite) the UNICORN_FD environment
170
+ variable internally when doing transparent upgrades.
171
+ .SH SIGNALS
172
+ .PP
173
+ The following UNIX signals may be sent to the master process:
174
+ .IP \[bu] 2
175
+ HUP \- reload config file, app, and gracefully restart all workers
176
+ .IP \[bu] 2
177
+ INT/TERM \- quick shutdown, kills all workers immediately
178
+ .IP \[bu] 2
179
+ QUIT \- graceful shutdown, waits for workers to finish their current
180
+ request before finishing.
181
+ .IP \[bu] 2
182
+ USR1 \- reopen all logs owned by the master and all workers See
183
+ Unicorn::Util.reopen_logs for what is considered a log.
184
+ .IP \[bu] 2
185
+ USR2 \- reexecute the running binary.
186
+ A separate QUIT should be sent to the original process once the child is
187
+ verified to be up and running.
188
+ .IP \[bu] 2
189
+ WINCH \- gracefully stops workers but keep the master running.
190
+ This will only work for daemonized processes.
191
+ .IP \[bu] 2
192
+ TTIN \- increment the number of worker processes by one
193
+ .IP \[bu] 2
194
+ TTOU \- decrement the number of worker processes by one
195
+ .PP
196
+ See the SIGNALS (https://bogomips.org/unicorn/SIGNALS.html) document for
197
+ full description of all signals used by Unicorn.
198
+ .SH SEE ALSO
199
+ .IP \[bu] 2
200
+ unicorn(1)
201
+ .IP \[bu] 2
202
+ \f[I]Rack::Builder\f[] ri/RDoc
203
+ .IP \[bu] 2
204
+ \f[I]Unicorn::Configurator\f[] ri/RDoc
205
+ .IP \[bu] 2
206
+ Unicorn RDoc (https://bogomips.org/unicorn/)
207
+ .IP \[bu] 2
208
+ Rack RDoc (http://www.rubydoc.info/github/rack/rack/)
209
+ .IP \[bu] 2
210
+ Rackup HowTo (https://github.com/rack/rack/wiki/tutorial-rackup-howto)
211
+ .SH AUTHORS
212
+ The Unicorn Community <unicorn-public@bogomips.org>.