preplay_unicorn 4.3.1.2.gc450

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 (259) hide show
  1. data/.CHANGELOG.old +25 -0
  2. data/.document +29 -0
  3. data/.gitignore +24 -0
  4. data/.mailmap +26 -0
  5. data/.manifest +258 -0
  6. data/.wrongdoc.yml +10 -0
  7. data/Application_Timeouts +77 -0
  8. data/CONTRIBUTORS +35 -0
  9. data/COPYING +674 -0
  10. data/ChangeLog +3839 -0
  11. data/DESIGN +97 -0
  12. data/Documentation/.gitignore +5 -0
  13. data/Documentation/GNUmakefile +30 -0
  14. data/Documentation/unicorn.1.txt +174 -0
  15. data/Documentation/unicorn_rails.1.txt +175 -0
  16. data/FAQ +53 -0
  17. data/GIT-VERSION-FILE +1 -0
  18. data/GIT-VERSION-GEN +40 -0
  19. data/GNUmakefile +294 -0
  20. data/HACKING +134 -0
  21. data/ISSUES +36 -0
  22. data/KNOWN_ISSUES +79 -0
  23. data/LATEST +15 -0
  24. data/LICENSE +64 -0
  25. data/Links +56 -0
  26. data/NEWS +1886 -0
  27. data/PHILOSOPHY +145 -0
  28. data/README +149 -0
  29. data/Rakefile +97 -0
  30. data/SIGNALS +114 -0
  31. data/Sandbox +96 -0
  32. data/TODO +5 -0
  33. data/TUNING +98 -0
  34. data/bin/unicorn +121 -0
  35. data/bin/unicorn_rails +209 -0
  36. data/examples/big_app_gc.rb +2 -0
  37. data/examples/echo.ru +27 -0
  38. data/examples/git.ru +13 -0
  39. data/examples/init.sh +74 -0
  40. data/examples/logger_mp_safe.rb +25 -0
  41. data/examples/logrotate.conf +29 -0
  42. data/examples/nginx.conf +156 -0
  43. data/examples/unicorn.conf.minimal.rb +13 -0
  44. data/examples/unicorn.conf.rb +94 -0
  45. data/ext/unicorn_http/CFLAGS +13 -0
  46. data/ext/unicorn_http/c_util.h +124 -0
  47. data/ext/unicorn_http/common_field_optimization.h +111 -0
  48. data/ext/unicorn_http/ext_help.h +86 -0
  49. data/ext/unicorn_http/extconf.rb +10 -0
  50. data/ext/unicorn_http/global_variables.h +97 -0
  51. data/ext/unicorn_http/httpdate.c +82 -0
  52. data/ext/unicorn_http/unicorn_http.c +4031 -0
  53. data/ext/unicorn_http/unicorn_http.rl +1036 -0
  54. data/ext/unicorn_http/unicorn_http_common.rl +76 -0
  55. data/lib/unicorn/app/exec_cgi.rb +154 -0
  56. data/lib/unicorn/app/inetd.rb +109 -0
  57. data/lib/unicorn/app/old_rails/static.rb +59 -0
  58. data/lib/unicorn/app/old_rails.rb +35 -0
  59. data/lib/unicorn/cgi_wrapper.rb +147 -0
  60. data/lib/unicorn/configurator.rb +641 -0
  61. data/lib/unicorn/const.rb +40 -0
  62. data/lib/unicorn/http_request.rb +77 -0
  63. data/lib/unicorn/http_response.rb +45 -0
  64. data/lib/unicorn/http_server.rb +748 -0
  65. data/lib/unicorn/launcher.rb +62 -0
  66. data/lib/unicorn/oob_gc.rb +71 -0
  67. data/lib/unicorn/preread_input.rb +33 -0
  68. data/lib/unicorn/socket_helper.rb +208 -0
  69. data/lib/unicorn/ssl_client.rb +11 -0
  70. data/lib/unicorn/ssl_configurator.rb +104 -0
  71. data/lib/unicorn/ssl_server.rb +42 -0
  72. data/lib/unicorn/stream_input.rb +149 -0
  73. data/lib/unicorn/tee_input.rb +126 -0
  74. data/lib/unicorn/tmpio.rb +29 -0
  75. data/lib/unicorn/util.rb +68 -0
  76. data/lib/unicorn/worker.rb +88 -0
  77. data/lib/unicorn.rb +107 -0
  78. data/local.mk.sample +59 -0
  79. data/man/man1/unicorn.1 +201 -0
  80. data/man/man1/unicorn_rails.1 +208 -0
  81. data/preplay_unicorn.gemspec +44 -0
  82. data/script/isolate_for_tests +50 -0
  83. data/setup.rb +1586 -0
  84. data/t/.gitignore +5 -0
  85. data/t/GNUmakefile +82 -0
  86. data/t/README +42 -0
  87. data/t/bin/content-md5-put +36 -0
  88. data/t/bin/sha1sum.rb +17 -0
  89. data/t/bin/unused_listen +40 -0
  90. data/t/bin/utee +12 -0
  91. data/t/broken-app.ru +12 -0
  92. data/t/detach.ru +11 -0
  93. data/t/env.ru +3 -0
  94. data/t/heartbeat-timeout.ru +12 -0
  95. data/t/my-tap-lib.sh +201 -0
  96. data/t/oob_gc.ru +21 -0
  97. data/t/oob_gc_path.ru +21 -0
  98. data/t/pid.ru +3 -0
  99. data/t/preread_input.ru +17 -0
  100. data/t/rack-input-tests.ru +21 -0
  101. data/t/rails3-app/.gitignore +4 -0
  102. data/t/rails3-app/Gemfile +26 -0
  103. data/t/rails3-app/Rakefile +10 -0
  104. data/t/rails3-app/app/controllers/application_controller.rb +4 -0
  105. data/t/rails3-app/app/helpers/application_helper.rb +2 -0
  106. data/t/rails3-app/app/views/layouts/application.html.erb +14 -0
  107. data/t/rails3-app/config/application.rb +46 -0
  108. data/t/rails3-app/config/boot.rb +6 -0
  109. data/t/rails3-app/config/database.yml +22 -0
  110. data/t/rails3-app/config/environment.rb +5 -0
  111. data/t/rails3-app/config/environments/development.rb +19 -0
  112. data/t/rails3-app/config/environments/production.rb +42 -0
  113. data/t/rails3-app/config/environments/test.rb +32 -0
  114. data/t/rails3-app/config/initializers/backtrace_silencers.rb +7 -0
  115. data/t/rails3-app/config/initializers/inflections.rb +10 -0
  116. data/t/rails3-app/config/initializers/mime_types.rb +5 -0
  117. data/t/rails3-app/config/initializers/secret_token.rb +7 -0
  118. data/t/rails3-app/config/initializers/session_store.rb +8 -0
  119. data/t/rails3-app/config/locales/en.yml +5 -0
  120. data/t/rails3-app/config/routes.rb +58 -0
  121. data/t/rails3-app/config.ru +4 -0
  122. data/t/rails3-app/db/seeds.rb +7 -0
  123. data/t/rails3-app/doc/README_FOR_APP +2 -0
  124. data/t/rails3-app/lib/tasks/.gitkeep +0 -0
  125. data/t/rails3-app/public/404.html +1 -0
  126. data/t/rails3-app/public/500.html +1 -0
  127. data/t/rails3-app/public/x.txt +1 -0
  128. data/t/rails3-app/script/rails +9 -0
  129. data/t/rails3-app/test/performance/browsing_test.rb +9 -0
  130. data/t/rails3-app/test/test_helper.rb +13 -0
  131. data/t/rails3-app/vendor/plugins/.gitkeep +0 -0
  132. data/t/sslgen.sh +71 -0
  133. data/t/t0000-http-basic.sh +50 -0
  134. data/t/t0001-reload-bad-config.sh +53 -0
  135. data/t/t0002-config-conflict.sh +49 -0
  136. data/t/t0002-parser-error.sh +94 -0
  137. data/t/t0003-working_directory.sh +51 -0
  138. data/t/t0004-heartbeat-timeout.sh +69 -0
  139. data/t/t0004-working_directory_broken.sh +24 -0
  140. data/t/t0005-working_directory_app.rb.sh +37 -0
  141. data/t/t0006-reopen-logs.sh +83 -0
  142. data/t/t0006.ru +13 -0
  143. data/t/t0007-working_directory_no_embed_cli.sh +44 -0
  144. data/t/t0008-back_out_of_upgrade.sh +110 -0
  145. data/t/t0009-broken-app.sh +56 -0
  146. data/t/t0009-winch_ttin.sh +59 -0
  147. data/t/t0010-reap-logging.sh +55 -0
  148. data/t/t0011-active-unix-socket.sh +79 -0
  149. data/t/t0012-reload-empty-config.sh +85 -0
  150. data/t/t0013-rewindable-input-false.sh +24 -0
  151. data/t/t0013.ru +12 -0
  152. data/t/t0014-rewindable-input-true.sh +24 -0
  153. data/t/t0014.ru +12 -0
  154. data/t/t0015-configurator-internals.sh +25 -0
  155. data/t/t0016-trust-x-forwarded-false.sh +30 -0
  156. data/t/t0017-trust-x-forwarded-true.sh +30 -0
  157. data/t/t0018-write-on-close.sh +23 -0
  158. data/t/t0019-max_header_len.sh +49 -0
  159. data/t/t0020-at_exit-handler.sh +49 -0
  160. data/t/t0021-process_detach.sh +29 -0
  161. data/t/t0100-rack-input-tests.sh +124 -0
  162. data/t/t0116-client_body_buffer_size.sh +80 -0
  163. data/t/t0116.ru +16 -0
  164. data/t/t0300-rails3-basic.sh +28 -0
  165. data/t/t0301-rails3-missing-config-ru.sh +33 -0
  166. data/t/t0302-rails3-alt-working_directory.sh +32 -0
  167. data/t/t0303-rails3-alt-working_directory_config.ru.sh +56 -0
  168. data/t/t0304-rails3-alt-working_directory_no_embed_cli.sh +52 -0
  169. data/t/t0600-https-server-basic.sh +48 -0
  170. data/t/t9000-preread-input.sh +48 -0
  171. data/t/t9001-oob_gc.sh +47 -0
  172. data/t/t9002-oob_gc-path.sh +75 -0
  173. data/t/test-lib.sh +113 -0
  174. data/t/test-rails3.sh +27 -0
  175. data/t/write-on-close.ru +11 -0
  176. data/test/aggregate.rb +15 -0
  177. data/test/benchmark/README +50 -0
  178. data/test/benchmark/dd.ru +18 -0
  179. data/test/benchmark/stack.ru +8 -0
  180. data/test/exec/README +5 -0
  181. data/test/exec/test_exec.rb +1055 -0
  182. data/test/rails/app-1.2.3/.gitignore +2 -0
  183. data/test/rails/app-1.2.3/Rakefile +7 -0
  184. data/test/rails/app-1.2.3/app/controllers/application.rb +6 -0
  185. data/test/rails/app-1.2.3/app/controllers/foo_controller.rb +36 -0
  186. data/test/rails/app-1.2.3/app/helpers/application_helper.rb +4 -0
  187. data/test/rails/app-1.2.3/config/boot.rb +11 -0
  188. data/test/rails/app-1.2.3/config/database.yml +12 -0
  189. data/test/rails/app-1.2.3/config/environment.rb +13 -0
  190. data/test/rails/app-1.2.3/config/environments/development.rb +9 -0
  191. data/test/rails/app-1.2.3/config/environments/production.rb +5 -0
  192. data/test/rails/app-1.2.3/config/routes.rb +6 -0
  193. data/test/rails/app-1.2.3/db/.gitignore +0 -0
  194. data/test/rails/app-1.2.3/log/.gitignore +1 -0
  195. data/test/rails/app-1.2.3/public/404.html +1 -0
  196. data/test/rails/app-1.2.3/public/500.html +1 -0
  197. data/test/rails/app-2.0.2/.gitignore +2 -0
  198. data/test/rails/app-2.0.2/Rakefile +7 -0
  199. data/test/rails/app-2.0.2/app/controllers/application.rb +4 -0
  200. data/test/rails/app-2.0.2/app/controllers/foo_controller.rb +36 -0
  201. data/test/rails/app-2.0.2/app/helpers/application_helper.rb +4 -0
  202. data/test/rails/app-2.0.2/config/boot.rb +11 -0
  203. data/test/rails/app-2.0.2/config/database.yml +12 -0
  204. data/test/rails/app-2.0.2/config/environment.rb +17 -0
  205. data/test/rails/app-2.0.2/config/environments/development.rb +8 -0
  206. data/test/rails/app-2.0.2/config/environments/production.rb +5 -0
  207. data/test/rails/app-2.0.2/config/routes.rb +6 -0
  208. data/test/rails/app-2.0.2/db/.gitignore +0 -0
  209. data/test/rails/app-2.0.2/log/.gitignore +1 -0
  210. data/test/rails/app-2.0.2/public/404.html +1 -0
  211. data/test/rails/app-2.0.2/public/500.html +1 -0
  212. data/test/rails/app-2.1.2/.gitignore +2 -0
  213. data/test/rails/app-2.1.2/Rakefile +7 -0
  214. data/test/rails/app-2.1.2/app/controllers/application.rb +4 -0
  215. data/test/rails/app-2.1.2/app/controllers/foo_controller.rb +36 -0
  216. data/test/rails/app-2.1.2/app/helpers/application_helper.rb +4 -0
  217. data/test/rails/app-2.1.2/config/boot.rb +111 -0
  218. data/test/rails/app-2.1.2/config/database.yml +12 -0
  219. data/test/rails/app-2.1.2/config/environment.rb +17 -0
  220. data/test/rails/app-2.1.2/config/environments/development.rb +7 -0
  221. data/test/rails/app-2.1.2/config/environments/production.rb +5 -0
  222. data/test/rails/app-2.1.2/config/routes.rb +6 -0
  223. data/test/rails/app-2.1.2/db/.gitignore +0 -0
  224. data/test/rails/app-2.1.2/log/.gitignore +1 -0
  225. data/test/rails/app-2.1.2/public/404.html +1 -0
  226. data/test/rails/app-2.1.2/public/500.html +1 -0
  227. data/test/rails/app-2.2.2/.gitignore +2 -0
  228. data/test/rails/app-2.2.2/Rakefile +7 -0
  229. data/test/rails/app-2.2.2/app/controllers/application.rb +4 -0
  230. data/test/rails/app-2.2.2/app/controllers/foo_controller.rb +36 -0
  231. data/test/rails/app-2.2.2/app/helpers/application_helper.rb +4 -0
  232. data/test/rails/app-2.2.2/config/boot.rb +111 -0
  233. data/test/rails/app-2.2.2/config/database.yml +12 -0
  234. data/test/rails/app-2.2.2/config/environment.rb +17 -0
  235. data/test/rails/app-2.2.2/config/environments/development.rb +7 -0
  236. data/test/rails/app-2.2.2/config/environments/production.rb +5 -0
  237. data/test/rails/app-2.2.2/config/routes.rb +6 -0
  238. data/test/rails/app-2.2.2/db/.gitignore +0 -0
  239. data/test/rails/app-2.2.2/log/.gitignore +1 -0
  240. data/test/rails/app-2.2.2/public/404.html +1 -0
  241. data/test/rails/app-2.2.2/public/500.html +1 -0
  242. data/test/rails/test_rails.rb +287 -0
  243. data/test/test_helper.rb +300 -0
  244. data/test/unit/test_configurator.rb +158 -0
  245. data/test/unit/test_droplet.rb +28 -0
  246. data/test/unit/test_http_parser.rb +860 -0
  247. data/test/unit/test_http_parser_ng.rb +716 -0
  248. data/test/unit/test_http_parser_xftrust.rb +38 -0
  249. data/test/unit/test_request.rb +197 -0
  250. data/test/unit/test_response.rb +99 -0
  251. data/test/unit/test_server.rb +289 -0
  252. data/test/unit/test_signals.rb +207 -0
  253. data/test/unit/test_sni_hostnames.rb +47 -0
  254. data/test/unit/test_socket_helper.rb +192 -0
  255. data/test/unit/test_stream_input.rb +204 -0
  256. data/test/unit/test_tee_input.rb +296 -0
  257. data/test/unit/test_upload.rb +306 -0
  258. data/test/unit/test_util.rb +100 -0
  259. metadata +428 -0
data/.CHANGELOG.old ADDED
@@ -0,0 +1,25 @@
1
+ v0.91.0 - HTTP/0.9 support, multiline header support, small fixes
2
+ v0.90.0 - switch chunking+trailer handling to Ragel, v0.8.4 fixes
3
+ v0.9.2 - Ruby 1.9.2 preview1 compatibility
4
+ v0.9.1 - FD_CLOEXEC portability fix (v0.8.2 port)
5
+ v0.9.0 - bodies: "Transfer-Encoding: chunked", rewindable streaming
6
+ v0.8.4 - pass through unknown HTTP status codes
7
+ v0.8.3 - Ruby 1.9.2 preview1 compatibility
8
+ v0.8.2 - socket handling bugfixes and usability tweaks
9
+ v0.8.1 - safer timeout handling, more consistent reload behavior
10
+ v0.8.0 - enforce Rack dependency, minor performance improvements and fixes
11
+ v0.7.1 - minor fixes, cleanups and documentation improvements
12
+ v0.7.0 - rack.version is 1.0
13
+ v0.6.0 - cleanups + optimizations, signals to {in,de}crement processes
14
+ v0.5.4 - fix data corruption with some small uploads (not curl)
15
+ v0.5.3 - fix 100% CPU usage when idle, small cleanups
16
+ v0.5.2 - force Status: header for compat, small cleanups
17
+ v0.5.1 - exit correctly on INT/TERM, QUIT is still recommended, however
18
+ v0.5.0 - {after,before}_fork API change, small tweaks/fixes
19
+ v0.4.2 - fix Rails ARStore, FD leak prevention, descriptive proctitles
20
+ v0.4.1 - Rails support, per-listener backlog and {snd,rcv}buf
21
+ v0.2.3 - Unlink Tempfiles after use (they were closed, just not unlinked)
22
+ v0.2.2 - small bug fixes, fix Rack multi-value headers (Set-Cookie:)
23
+ v0.2.1 - Fix broken Manifest that cause unicorn_rails to not be bundled
24
+ v0.2.0 - unicorn_rails launcher script.
25
+ v0.1.0 - Unicorn - UNIX-only fork of Mongrel free of threading
data/.document ADDED
@@ -0,0 +1,29 @@
1
+ FAQ
2
+ README
3
+ TUNING
4
+ PHILOSOPHY
5
+ HACKING
6
+ DESIGN
7
+ CONTRIBUTORS
8
+ LICENSE
9
+ SIGNALS
10
+ KNOWN_ISSUES
11
+ TODO
12
+ NEWS
13
+ ChangeLog
14
+ LATEST
15
+ lib/unicorn.rb
16
+ lib/unicorn/configurator.rb
17
+ lib/unicorn/http_server.rb
18
+ lib/unicorn/preread_input.rb
19
+ lib/unicorn/stream_input.rb
20
+ lib/unicorn/tee_input.rb
21
+ lib/unicorn/util.rb
22
+ lib/unicorn/oob_gc.rb
23
+ lib/unicorn/worker.rb
24
+ unicorn_1
25
+ unicorn_rails_1
26
+ ISSUES
27
+ Sandbox
28
+ Links
29
+ Application_Timeouts
data/.gitignore ADDED
@@ -0,0 +1,24 @@
1
+ *.o
2
+ *.bundle
3
+ *.log
4
+ *.so
5
+ *.rbc
6
+ .DS_Store
7
+ /.config
8
+ /InstalledFiles
9
+ /doc
10
+ /local.mk
11
+ /test/rbx-*
12
+ /test/ruby-*
13
+ ext/unicorn_http/Makefile
14
+ ext/unicorn_http/unicorn_http.c
15
+ log/
16
+ pkg/
17
+ /vendor
18
+ /NEWS
19
+ /ChangeLog
20
+ /.manifest
21
+ /GIT-VERSION-FILE
22
+ /man
23
+ /tmp
24
+ /LATEST
data/.mailmap ADDED
@@ -0,0 +1,26 @@
1
+ # This list is used by "git shortlog" to fixup the ugly faux email addresses
2
+ # "<username@UGLY-UUID>" that the "git svn" tool creates by default.
3
+
4
+ # Eric Wong started this .mailmap file (and is the maintainer of it...)
5
+ Eric Wong <normalperson@yhbt.net> normalperson <normalperson@19e92222-5c0b-0410-8929-a290d50e31e9>
6
+
7
+ # This also includes all the Mongrel contributors that committed to the
8
+ # Rubyforge SVN repo. Some real names were looked up on rubyforge.org
9
+ # (http://rubyforge.org/users/$user), but we're not going expose any email
10
+ # addresses here without their permission.
11
+
12
+ Austin Godber godber <godber> godber <godber@19e92222-5c0b-0410-8929-a290d50e31e9>
13
+ Bradley Taylor <bktaylor> bktaylor <bktaylor@19e92222-5c0b-0410-8929-a290d50e31e9>
14
+ Ezra Zygmuntowicz <ezmobius> ezmobius <ezmobius@19e92222-5c0b-0410-8929-a290d50e31e9>
15
+ Filipe Lautert <filipe> filipe <filipe@19e92222-5c0b-0410-8929-a290d50e31e9>
16
+ Luis Lavena <luislavena> luislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9>
17
+ Matt Pelletier <bricolage> bricolage <bricolage@19e92222-5c0b-0410-8929-a290d50e31e9>
18
+ MenTaLguY <mental> mental <mental@19e92222-5c0b-0410-8929-a290d50e31e9>
19
+ Nick Sieger <nicksieger> nicksieger <nicksieger@19e92222-5c0b-0410-8929-a290d50e31e9>
20
+ Rick Olson <technoweenie> technoweenie <technoweenie@19e92222-5c0b-0410-8929-a290d50e31e9>
21
+ Wayne E. Seguin <wayneeseguin> wayneeseguin <wayneeseguin@19e92222-5c0b-0410-8929-a290d50e31e9>
22
+ Zed A. Shaw <zedshaw> <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>
23
+ why the lucky stiff <whytheluckystiff> <why@19e92222-5c0b-0410-8929-a290d50e31e9>
24
+
25
+ # Evan had his email address in the git history we branched from anyways
26
+ Evan Weaver <eweaver@twitter.com> evanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>
data/.manifest ADDED
@@ -0,0 +1,258 @@
1
+ .CHANGELOG.old
2
+ .document
3
+ .gitignore
4
+ .mailmap
5
+ .manifest
6
+ .wrongdoc.yml
7
+ Application_Timeouts
8
+ CONTRIBUTORS
9
+ COPYING
10
+ ChangeLog
11
+ DESIGN
12
+ Documentation/.gitignore
13
+ Documentation/GNUmakefile
14
+ Documentation/unicorn.1.txt
15
+ Documentation/unicorn_rails.1.txt
16
+ FAQ
17
+ GIT-VERSION-FILE
18
+ GIT-VERSION-GEN
19
+ GNUmakefile
20
+ HACKING
21
+ ISSUES
22
+ KNOWN_ISSUES
23
+ LATEST
24
+ LICENSE
25
+ Links
26
+ NEWS
27
+ PHILOSOPHY
28
+ README
29
+ Rakefile
30
+ SIGNALS
31
+ Sandbox
32
+ TODO
33
+ TUNING
34
+ bin/unicorn
35
+ bin/unicorn_rails
36
+ examples/big_app_gc.rb
37
+ examples/echo.ru
38
+ examples/git.ru
39
+ examples/init.sh
40
+ examples/logger_mp_safe.rb
41
+ examples/logrotate.conf
42
+ examples/nginx.conf
43
+ examples/unicorn.conf.minimal.rb
44
+ examples/unicorn.conf.rb
45
+ ext/unicorn_http/CFLAGS
46
+ ext/unicorn_http/c_util.h
47
+ ext/unicorn_http/common_field_optimization.h
48
+ ext/unicorn_http/ext_help.h
49
+ ext/unicorn_http/extconf.rb
50
+ ext/unicorn_http/global_variables.h
51
+ ext/unicorn_http/httpdate.c
52
+ ext/unicorn_http/unicorn_http.c
53
+ ext/unicorn_http/unicorn_http.rl
54
+ ext/unicorn_http/unicorn_http_common.rl
55
+ lib/unicorn.rb
56
+ lib/unicorn/app/exec_cgi.rb
57
+ lib/unicorn/app/inetd.rb
58
+ lib/unicorn/app/old_rails.rb
59
+ lib/unicorn/app/old_rails/static.rb
60
+ lib/unicorn/cgi_wrapper.rb
61
+ lib/unicorn/configurator.rb
62
+ lib/unicorn/const.rb
63
+ lib/unicorn/http_request.rb
64
+ lib/unicorn/http_response.rb
65
+ lib/unicorn/http_server.rb
66
+ lib/unicorn/launcher.rb
67
+ lib/unicorn/oob_gc.rb
68
+ lib/unicorn/preread_input.rb
69
+ lib/unicorn/socket_helper.rb
70
+ lib/unicorn/ssl_client.rb
71
+ lib/unicorn/ssl_configurator.rb
72
+ lib/unicorn/ssl_server.rb
73
+ lib/unicorn/stream_input.rb
74
+ lib/unicorn/tee_input.rb
75
+ lib/unicorn/tmpio.rb
76
+ lib/unicorn/util.rb
77
+ lib/unicorn/worker.rb
78
+ local.mk.sample
79
+ man/man1/unicorn.1
80
+ man/man1/unicorn_rails.1
81
+ preplay_unicorn.gemspec
82
+ script/isolate_for_tests
83
+ setup.rb
84
+ t/.gitignore
85
+ t/GNUmakefile
86
+ t/README
87
+ t/bin/content-md5-put
88
+ t/bin/sha1sum.rb
89
+ t/bin/unused_listen
90
+ t/bin/utee
91
+ t/broken-app.ru
92
+ t/detach.ru
93
+ t/env.ru
94
+ t/heartbeat-timeout.ru
95
+ t/my-tap-lib.sh
96
+ t/oob_gc.ru
97
+ t/oob_gc_path.ru
98
+ t/pid.ru
99
+ t/preread_input.ru
100
+ t/rack-input-tests.ru
101
+ t/rails3-app/.gitignore
102
+ t/rails3-app/Gemfile
103
+ t/rails3-app/Rakefile
104
+ t/rails3-app/app/controllers/application_controller.rb
105
+ t/rails3-app/app/helpers/application_helper.rb
106
+ t/rails3-app/app/views/layouts/application.html.erb
107
+ t/rails3-app/config.ru
108
+ t/rails3-app/config/application.rb
109
+ t/rails3-app/config/boot.rb
110
+ t/rails3-app/config/database.yml
111
+ t/rails3-app/config/environment.rb
112
+ t/rails3-app/config/environments/development.rb
113
+ t/rails3-app/config/environments/production.rb
114
+ t/rails3-app/config/environments/test.rb
115
+ t/rails3-app/config/initializers/backtrace_silencers.rb
116
+ t/rails3-app/config/initializers/inflections.rb
117
+ t/rails3-app/config/initializers/mime_types.rb
118
+ t/rails3-app/config/initializers/secret_token.rb
119
+ t/rails3-app/config/initializers/session_store.rb
120
+ t/rails3-app/config/locales/en.yml
121
+ t/rails3-app/config/routes.rb
122
+ t/rails3-app/db/seeds.rb
123
+ t/rails3-app/doc/README_FOR_APP
124
+ t/rails3-app/lib/tasks/.gitkeep
125
+ t/rails3-app/public/404.html
126
+ t/rails3-app/public/500.html
127
+ t/rails3-app/public/x.txt
128
+ t/rails3-app/script/rails
129
+ t/rails3-app/test/performance/browsing_test.rb
130
+ t/rails3-app/test/test_helper.rb
131
+ t/rails3-app/vendor/plugins/.gitkeep
132
+ t/sslgen.sh
133
+ t/t0000-http-basic.sh
134
+ t/t0001-reload-bad-config.sh
135
+ t/t0002-config-conflict.sh
136
+ t/t0002-parser-error.sh
137
+ t/t0003-working_directory.sh
138
+ t/t0004-heartbeat-timeout.sh
139
+ t/t0004-working_directory_broken.sh
140
+ t/t0005-working_directory_app.rb.sh
141
+ t/t0006-reopen-logs.sh
142
+ t/t0006.ru
143
+ t/t0007-working_directory_no_embed_cli.sh
144
+ t/t0008-back_out_of_upgrade.sh
145
+ t/t0009-broken-app.sh
146
+ t/t0009-winch_ttin.sh
147
+ t/t0010-reap-logging.sh
148
+ t/t0011-active-unix-socket.sh
149
+ t/t0012-reload-empty-config.sh
150
+ t/t0013-rewindable-input-false.sh
151
+ t/t0013.ru
152
+ t/t0014-rewindable-input-true.sh
153
+ t/t0014.ru
154
+ t/t0015-configurator-internals.sh
155
+ t/t0016-trust-x-forwarded-false.sh
156
+ t/t0017-trust-x-forwarded-true.sh
157
+ t/t0018-write-on-close.sh
158
+ t/t0019-max_header_len.sh
159
+ t/t0020-at_exit-handler.sh
160
+ t/t0021-process_detach.sh
161
+ t/t0100-rack-input-tests.sh
162
+ t/t0116-client_body_buffer_size.sh
163
+ t/t0116.ru
164
+ t/t0300-rails3-basic.sh
165
+ t/t0301-rails3-missing-config-ru.sh
166
+ t/t0302-rails3-alt-working_directory.sh
167
+ t/t0303-rails3-alt-working_directory_config.ru.sh
168
+ t/t0304-rails3-alt-working_directory_no_embed_cli.sh
169
+ t/t0600-https-server-basic.sh
170
+ t/t9000-preread-input.sh
171
+ t/t9001-oob_gc.sh
172
+ t/t9002-oob_gc-path.sh
173
+ t/test-lib.sh
174
+ t/test-rails3.sh
175
+ t/write-on-close.ru
176
+ test/aggregate.rb
177
+ test/benchmark/README
178
+ test/benchmark/dd.ru
179
+ test/benchmark/stack.ru
180
+ test/exec/README
181
+ test/exec/test_exec.rb
182
+ test/rails/app-1.2.3/.gitignore
183
+ test/rails/app-1.2.3/Rakefile
184
+ test/rails/app-1.2.3/app/controllers/application.rb
185
+ test/rails/app-1.2.3/app/controllers/foo_controller.rb
186
+ test/rails/app-1.2.3/app/helpers/application_helper.rb
187
+ test/rails/app-1.2.3/config/boot.rb
188
+ test/rails/app-1.2.3/config/database.yml
189
+ test/rails/app-1.2.3/config/environment.rb
190
+ test/rails/app-1.2.3/config/environments/development.rb
191
+ test/rails/app-1.2.3/config/environments/production.rb
192
+ test/rails/app-1.2.3/config/routes.rb
193
+ test/rails/app-1.2.3/db/.gitignore
194
+ test/rails/app-1.2.3/log/.gitignore
195
+ test/rails/app-1.2.3/public/404.html
196
+ test/rails/app-1.2.3/public/500.html
197
+ test/rails/app-2.0.2/.gitignore
198
+ test/rails/app-2.0.2/Rakefile
199
+ test/rails/app-2.0.2/app/controllers/application.rb
200
+ test/rails/app-2.0.2/app/controllers/foo_controller.rb
201
+ test/rails/app-2.0.2/app/helpers/application_helper.rb
202
+ test/rails/app-2.0.2/config/boot.rb
203
+ test/rails/app-2.0.2/config/database.yml
204
+ test/rails/app-2.0.2/config/environment.rb
205
+ test/rails/app-2.0.2/config/environments/development.rb
206
+ test/rails/app-2.0.2/config/environments/production.rb
207
+ test/rails/app-2.0.2/config/routes.rb
208
+ test/rails/app-2.0.2/db/.gitignore
209
+ test/rails/app-2.0.2/log/.gitignore
210
+ test/rails/app-2.0.2/public/404.html
211
+ test/rails/app-2.0.2/public/500.html
212
+ test/rails/app-2.1.2/.gitignore
213
+ test/rails/app-2.1.2/Rakefile
214
+ test/rails/app-2.1.2/app/controllers/application.rb
215
+ test/rails/app-2.1.2/app/controllers/foo_controller.rb
216
+ test/rails/app-2.1.2/app/helpers/application_helper.rb
217
+ test/rails/app-2.1.2/config/boot.rb
218
+ test/rails/app-2.1.2/config/database.yml
219
+ test/rails/app-2.1.2/config/environment.rb
220
+ test/rails/app-2.1.2/config/environments/development.rb
221
+ test/rails/app-2.1.2/config/environments/production.rb
222
+ test/rails/app-2.1.2/config/routes.rb
223
+ test/rails/app-2.1.2/db/.gitignore
224
+ test/rails/app-2.1.2/log/.gitignore
225
+ test/rails/app-2.1.2/public/404.html
226
+ test/rails/app-2.1.2/public/500.html
227
+ test/rails/app-2.2.2/.gitignore
228
+ test/rails/app-2.2.2/Rakefile
229
+ test/rails/app-2.2.2/app/controllers/application.rb
230
+ test/rails/app-2.2.2/app/controllers/foo_controller.rb
231
+ test/rails/app-2.2.2/app/helpers/application_helper.rb
232
+ test/rails/app-2.2.2/config/boot.rb
233
+ test/rails/app-2.2.2/config/database.yml
234
+ test/rails/app-2.2.2/config/environment.rb
235
+ test/rails/app-2.2.2/config/environments/development.rb
236
+ test/rails/app-2.2.2/config/environments/production.rb
237
+ test/rails/app-2.2.2/config/routes.rb
238
+ test/rails/app-2.2.2/db/.gitignore
239
+ test/rails/app-2.2.2/log/.gitignore
240
+ test/rails/app-2.2.2/public/404.html
241
+ test/rails/app-2.2.2/public/500.html
242
+ test/rails/test_rails.rb
243
+ test/test_helper.rb
244
+ test/unit/test_configurator.rb
245
+ test/unit/test_droplet.rb
246
+ test/unit/test_http_parser.rb
247
+ test/unit/test_http_parser_ng.rb
248
+ test/unit/test_http_parser_xftrust.rb
249
+ test/unit/test_request.rb
250
+ test/unit/test_response.rb
251
+ test/unit/test_server.rb
252
+ test/unit/test_signals.rb
253
+ test/unit/test_sni_hostnames.rb
254
+ test/unit/test_socket_helper.rb
255
+ test/unit/test_stream_input.rb
256
+ test/unit/test_tee_input.rb
257
+ test/unit/test_upload.rb
258
+ test/unit/test_util.rb
data/.wrongdoc.yml ADDED
@@ -0,0 +1,10 @@
1
+ ---
2
+ cgit_url: http://bogomips.org/unicorn.git
3
+ git_url: git://bogomips.org/unicorn.git
4
+ rdoc_url: http://unicorn.bogomips.org/
5
+ changelog_start: v1.1.5
6
+ merge_html:
7
+ unicorn_1: Documentation/unicorn.1.html
8
+ unicorn_rails_1: Documentation/unicorn_rails.1.html
9
+ public_email: mongrel-unicorn@rubyforge.org
10
+ private_email: unicorn@bogomips.org
@@ -0,0 +1,77 @@
1
+ = Application Timeouts
2
+
3
+ This article focuses on _application_ setup for Rack applications, but
4
+ can be expanded to all applications that connect to external resources
5
+ and expect short response times.
6
+
7
+ This article is not specific to \Unicorn, but exists to discourage
8
+ the overuse of the built-in
9
+ {timeout}[link:Unicorn/Configurator.html#method-i-timeout] directive
10
+ in \Unicorn.
11
+
12
+ == ALL External Resources Are Considered Unreliable
13
+
14
+ Network reliability can _never_ be guaranteed. Network failures cannot
15
+ be detected reliably by the client (Rack application) in a reasonable
16
+ timeframe, not even on a LAN.
17
+
18
+ Thus, application authors must configure timeouts when interacting with
19
+ external resources.
20
+
21
+ Most database adapters allow configurable timeouts.
22
+
23
+ Net::HTTP and Net::SMTP in the Ruby standard library allow
24
+ configurable timeouts.
25
+
26
+ Even for things as fast as {memcached}[http://memcached.org/],
27
+ {dalli}[http://rubygems.org/gems/dalli],
28
+ {memcached}[http://rubygems.org/gems/memcached] and
29
+ {memcache-client}[http://rubygems.org/gems/memcache-client] RubyGems all
30
+ offer configurable timeouts.
31
+
32
+ Consult the relevant documentation for the libraries you use on
33
+ how to configure these timeouts.
34
+
35
+ == Rolling Your Own Socket Code
36
+
37
+ Use non-blocking I/O and IO.select with a timeout to wait on sockets.
38
+
39
+ == Timeout module in the Ruby standard library
40
+
41
+ Ruby offers a Timeout module in its standard library. It has several
42
+ caveats and is not always reliable:
43
+
44
+ * /Some/ Ruby C extensions are not interrupted/timed-out gracefully by
45
+ this module (report these bugs to extension authors, please) but
46
+ pure-Ruby components should be.
47
+
48
+ * Long-running tasks may run inside `ensure' clauses after timeout
49
+ fires, causing the timeout to be ineffective.
50
+
51
+ The Timeout module is a second-to-last-resort solution, timeouts using
52
+ IO.select (or similar) are more reliable. If you depend on libraries
53
+ that do not offer timeouts when connecting to external resources, kindly
54
+ ask those library authors to provide configurable timeouts.
55
+
56
+ === A Note About Filesystems
57
+
58
+ Most operations to regular files on POSIX filesystems are NOT
59
+ interruptable. Thus, the "timeout" module in the Ruby standard library
60
+ can not reliably timeout systems with massive amounts of iowait.
61
+
62
+ If your app relies on the filesystem, ensure all the data your
63
+ application works with is small enough to fit in the kernel page cache.
64
+ Otherwise increase the amount of physical memory you have to match, or
65
+ employ a fast, low-latency storage system (solid state).
66
+
67
+ Volumes mounted over NFS (and thus a potentially unreliable network)
68
+ must be mounted with timeouts and applications must be prepared to
69
+ handle network/server failures.
70
+
71
+ == The Last Line Of Defense
72
+
73
+ The {timeout}[link:Unicorn/Configurator.html#method-i-timeout] mechanism
74
+ in \Unicorn is an extreme solution that should be avoided whenever
75
+ possible. It will help catch bugs in your application where and when
76
+ your application forgets to use timeouts, but it is expensive as it
77
+ kills and respawns a worker process.
data/CONTRIBUTORS ADDED
@@ -0,0 +1,35 @@
1
+ Unicorn developers (let us know if we forgot you):
2
+ * Eric Wong (BDFL, BOFH)
3
+ * Suraj N. Kurapati
4
+ * Andrey Stikheev
5
+ * Wayne Larsen
6
+ * Iñaki Baz Castillo
7
+ * Augusto Becciu
8
+ * Hongli Lai
9
+ * ... (help wanted)
10
+
11
+ We would like to thank following folks for helping make Unicorn possible:
12
+
13
+ * Ezra Zygmuntowicz - for helping Eric decide on a sane configuration
14
+ format and reasonable defaults.
15
+ * Christian Neukirchen - for Rack, which let us put more focus on the server
16
+ and drastically cut down on the amount of code we have to maintain.
17
+ * Zed A. Shaw - for Mongrel, without which Unicorn would not be possible
18
+
19
+ The original Mongrel contributors:
20
+
21
+ * Luis Lavena
22
+ * Wilson Bilkovich
23
+ * why the lucky stiff
24
+ * Dan Kubb
25
+ * MenTaLguY
26
+ * Filipe Lautert
27
+ * Rick Olson
28
+ * Wayne E. Seguin
29
+ * Kirk Haines
30
+ * Bradley Taylor
31
+ * Matt Pelletier
32
+ * Ry Dahl
33
+ * Nick Sieger
34
+ * Evan Weaver
35
+ * Marc-André Cournoyer