unicorn-heroku-wait 4.8.0.1.g0ed2.dirty

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +7 -0
  2. data/.CHANGELOG.old +25 -0
  3. data/.document +29 -0
  4. data/.gitignore +25 -0
  5. data/.mailmap +26 -0
  6. data/.manifest +166 -0
  7. data/.wrongdoc.yml +10 -0
  8. data/Application_Timeouts +77 -0
  9. data/CONTRIBUTORS +35 -0
  10. data/COPYING +674 -0
  11. data/ChangeLog +4861 -0
  12. data/DESIGN +97 -0
  13. data/Documentation/.gitignore +5 -0
  14. data/Documentation/GNUmakefile +30 -0
  15. data/Documentation/unicorn.1.txt +178 -0
  16. data/Documentation/unicorn_rails.1.txt +175 -0
  17. data/FAQ +53 -0
  18. data/GIT-VERSION-FILE +1 -0
  19. data/GIT-VERSION-GEN +39 -0
  20. data/GNUmakefile +267 -0
  21. data/HACKING +134 -0
  22. data/ISSUES +36 -0
  23. data/KNOWN_ISSUES +79 -0
  24. data/LATEST +28 -0
  25. data/LICENSE +67 -0
  26. data/Links +56 -0
  27. data/NEWS +2067 -0
  28. data/PHILOSOPHY +145 -0
  29. data/README +150 -0
  30. data/Rakefile +60 -0
  31. data/SIGNALS +123 -0
  32. data/Sandbox +103 -0
  33. data/TODO +5 -0
  34. data/TUNING +98 -0
  35. data/bin/unicorn +126 -0
  36. data/bin/unicorn_rails +209 -0
  37. data/examples/big_app_gc.rb +2 -0
  38. data/examples/echo.ru +27 -0
  39. data/examples/git.ru +13 -0
  40. data/examples/init.sh +74 -0
  41. data/examples/logger_mp_safe.rb +25 -0
  42. data/examples/logrotate.conf +29 -0
  43. data/examples/nginx.conf +156 -0
  44. data/examples/unicorn.conf.minimal.rb +13 -0
  45. data/examples/unicorn.conf.rb +102 -0
  46. data/ext/unicorn_http/CFLAGS +13 -0
  47. data/ext/unicorn_http/c_util.h +124 -0
  48. data/ext/unicorn_http/common_field_optimization.h +111 -0
  49. data/ext/unicorn_http/ext_help.h +82 -0
  50. data/ext/unicorn_http/extconf.rb +10 -0
  51. data/ext/unicorn_http/global_variables.h +97 -0
  52. data/ext/unicorn_http/httpdate.c +78 -0
  53. data/ext/unicorn_http/unicorn_http.c +4031 -0
  54. data/ext/unicorn_http/unicorn_http.rl +1036 -0
  55. data/ext/unicorn_http/unicorn_http_common.rl +76 -0
  56. data/lib/unicorn/app/exec_cgi.rb +154 -0
  57. data/lib/unicorn/app/inetd.rb +109 -0
  58. data/lib/unicorn/app/old_rails/static.rb +59 -0
  59. data/lib/unicorn/app/old_rails.rb +35 -0
  60. data/lib/unicorn/cgi_wrapper.rb +147 -0
  61. data/lib/unicorn/configurator.rb +679 -0
  62. data/lib/unicorn/const.rb +44 -0
  63. data/lib/unicorn/http_request.rb +122 -0
  64. data/lib/unicorn/http_response.rb +75 -0
  65. data/lib/unicorn/http_server.rb +803 -0
  66. data/lib/unicorn/launcher.rb +62 -0
  67. data/lib/unicorn/oob_gc.rb +71 -0
  68. data/lib/unicorn/preread_input.rb +33 -0
  69. data/lib/unicorn/socket_helper.rb +231 -0
  70. data/lib/unicorn/ssl_client.rb +11 -0
  71. data/lib/unicorn/ssl_configurator.rb +104 -0
  72. data/lib/unicorn/ssl_server.rb +42 -0
  73. data/lib/unicorn/stream_input.rb +146 -0
  74. data/lib/unicorn/tee_input.rb +126 -0
  75. data/lib/unicorn/tmpio.rb +29 -0
  76. data/lib/unicorn/util.rb +89 -0
  77. data/lib/unicorn/version.rb +1 -0
  78. data/lib/unicorn/worker.rb +152 -0
  79. data/lib/unicorn.rb +118 -0
  80. data/local.mk.sample +59 -0
  81. data/man/man1/unicorn.1 +211 -0
  82. data/man/man1/unicorn_rails.1 +210 -0
  83. data/script/isolate_for_tests +32 -0
  84. data/setup.rb +1586 -0
  85. data/t/.gitignore +5 -0
  86. data/t/GNUmakefile +82 -0
  87. data/t/README +42 -0
  88. data/t/bin/content-md5-put +36 -0
  89. data/t/bin/sha1sum.rb +17 -0
  90. data/t/bin/unused_listen +40 -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/fails-rack-lint.ru +5 -0
  95. data/t/heartbeat-timeout.ru +12 -0
  96. data/t/hijack.ru +42 -0
  97. data/t/listener_names.ru +4 -0
  98. data/t/my-tap-lib.sh +201 -0
  99. data/t/oob_gc.ru +20 -0
  100. data/t/oob_gc_path.ru +20 -0
  101. data/t/pid.ru +3 -0
  102. data/t/preread_input.ru +17 -0
  103. data/t/rack-input-tests.ru +21 -0
  104. data/t/sslgen.sh +71 -0
  105. data/t/t0000-http-basic.sh +50 -0
  106. data/t/t0001-reload-bad-config.sh +53 -0
  107. data/t/t0002-config-conflict.sh +49 -0
  108. data/t/t0002-parser-error.sh +94 -0
  109. data/t/t0003-working_directory.sh +51 -0
  110. data/t/t0004-heartbeat-timeout.sh +69 -0
  111. data/t/t0004-working_directory_broken.sh +24 -0
  112. data/t/t0005-working_directory_app.rb.sh +40 -0
  113. data/t/t0006-reopen-logs.sh +83 -0
  114. data/t/t0006.ru +13 -0
  115. data/t/t0007-working_directory_no_embed_cli.sh +44 -0
  116. data/t/t0008-back_out_of_upgrade.sh +110 -0
  117. data/t/t0009-broken-app.sh +56 -0
  118. data/t/t0009-winch_ttin.sh +59 -0
  119. data/t/t0010-reap-logging.sh +55 -0
  120. data/t/t0011-active-unix-socket.sh +79 -0
  121. data/t/t0012-reload-empty-config.sh +85 -0
  122. data/t/t0013-rewindable-input-false.sh +24 -0
  123. data/t/t0013.ru +12 -0
  124. data/t/t0014-rewindable-input-true.sh +24 -0
  125. data/t/t0014.ru +12 -0
  126. data/t/t0015-configurator-internals.sh +25 -0
  127. data/t/t0016-trust-x-forwarded-false.sh +30 -0
  128. data/t/t0017-trust-x-forwarded-true.sh +30 -0
  129. data/t/t0018-write-on-close.sh +23 -0
  130. data/t/t0019-max_header_len.sh +49 -0
  131. data/t/t0020-at_exit-handler.sh +49 -0
  132. data/t/t0021-process_detach.sh +29 -0
  133. data/t/t0022-listener_names-preload_app.sh +32 -0
  134. data/t/t0100-rack-input-tests.sh +124 -0
  135. data/t/t0116-client_body_buffer_size.sh +80 -0
  136. data/t/t0116.ru +16 -0
  137. data/t/t0200-rack-hijack.sh +27 -0
  138. data/t/t0300-no-default-middleware.sh +20 -0
  139. data/t/t0600-https-server-basic.sh +48 -0
  140. data/t/t9000-preread-input.sh +48 -0
  141. data/t/t9001-oob_gc.sh +47 -0
  142. data/t/t9002-oob_gc-path.sh +75 -0
  143. data/t/test-lib.sh +128 -0
  144. data/t/write-on-close.ru +11 -0
  145. data/test/aggregate.rb +15 -0
  146. data/test/benchmark/README +50 -0
  147. data/test/benchmark/dd.ru +18 -0
  148. data/test/benchmark/stack.ru +8 -0
  149. data/test/exec/README +5 -0
  150. data/test/exec/test_exec.rb +1047 -0
  151. data/test/test_helper.rb +297 -0
  152. data/test/unit/test_configurator.rb +175 -0
  153. data/test/unit/test_droplet.rb +28 -0
  154. data/test/unit/test_http_parser.rb +854 -0
  155. data/test/unit/test_http_parser_ng.rb +731 -0
  156. data/test/unit/test_http_parser_xftrust.rb +38 -0
  157. data/test/unit/test_request.rb +182 -0
  158. data/test/unit/test_response.rb +99 -0
  159. data/test/unit/test_server.rb +268 -0
  160. data/test/unit/test_signals.rb +188 -0
  161. data/test/unit/test_sni_hostnames.rb +47 -0
  162. data/test/unit/test_socket_helper.rb +197 -0
  163. data/test/unit/test_stream_input.rb +203 -0
  164. data/test/unit/test_tee_input.rb +294 -0
  165. data/test/unit/test_upload.rb +306 -0
  166. data/test/unit/test_util.rb +105 -0
  167. data/unicorn.gemspec +44 -0
  168. metadata +328 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f144d07e89e5ccc527e2f587a1892dbf3bf8c342
4
+ data.tar.gz: c7dd885686553ca91bc6b48bc63317e1b3b50b16
5
+ SHA512:
6
+ metadata.gz: c4477ca84dbb3bac2f497a79d7874af1048fd9b98c78cf991efe39d49a61557f9f0a6993659325f6e25067a38a0fd86f52f5636bc9a6fdfdc163ae466181f311
7
+ data.tar.gz: 24509f4603b7d9c1f76ddb33d9239f4c279081c7eeffa4000d35d2936592f8587f6bc16c14ebac2a70258753892c0dcb6bfb19d12c97c0f9903719bec0001fdd
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,25 @@
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
25
+ /lib/unicorn/version.rb
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,166 @@
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/version.rb
78
+ lib/unicorn/worker.rb
79
+ local.mk.sample
80
+ man/man1/unicorn.1
81
+ man/man1/unicorn_rails.1
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/broken-app.ru
91
+ t/detach.ru
92
+ t/env.ru
93
+ t/fails-rack-lint.ru
94
+ t/heartbeat-timeout.ru
95
+ t/hijack.ru
96
+ t/listener_names.ru
97
+ t/my-tap-lib.sh
98
+ t/oob_gc.ru
99
+ t/oob_gc_path.ru
100
+ t/pid.ru
101
+ t/preread_input.ru
102
+ t/rack-input-tests.ru
103
+ t/sslgen.sh
104
+ t/t0000-http-basic.sh
105
+ t/t0001-reload-bad-config.sh
106
+ t/t0002-config-conflict.sh
107
+ t/t0002-parser-error.sh
108
+ t/t0003-working_directory.sh
109
+ t/t0004-heartbeat-timeout.sh
110
+ t/t0004-working_directory_broken.sh
111
+ t/t0005-working_directory_app.rb.sh
112
+ t/t0006-reopen-logs.sh
113
+ t/t0006.ru
114
+ t/t0007-working_directory_no_embed_cli.sh
115
+ t/t0008-back_out_of_upgrade.sh
116
+ t/t0009-broken-app.sh
117
+ t/t0009-winch_ttin.sh
118
+ t/t0010-reap-logging.sh
119
+ t/t0011-active-unix-socket.sh
120
+ t/t0012-reload-empty-config.sh
121
+ t/t0013-rewindable-input-false.sh
122
+ t/t0013.ru
123
+ t/t0014-rewindable-input-true.sh
124
+ t/t0014.ru
125
+ t/t0015-configurator-internals.sh
126
+ t/t0016-trust-x-forwarded-false.sh
127
+ t/t0017-trust-x-forwarded-true.sh
128
+ t/t0018-write-on-close.sh
129
+ t/t0019-max_header_len.sh
130
+ t/t0020-at_exit-handler.sh
131
+ t/t0021-process_detach.sh
132
+ t/t0022-listener_names-preload_app.sh
133
+ t/t0100-rack-input-tests.sh
134
+ t/t0116-client_body_buffer_size.sh
135
+ t/t0116.ru
136
+ t/t0200-rack-hijack.sh
137
+ t/t0300-no-default-middleware.sh
138
+ t/t0600-https-server-basic.sh
139
+ t/t9000-preread-input.sh
140
+ t/t9001-oob_gc.sh
141
+ t/t9002-oob_gc-path.sh
142
+ t/test-lib.sh
143
+ t/write-on-close.ru
144
+ test/aggregate.rb
145
+ test/benchmark/README
146
+ test/benchmark/dd.ru
147
+ test/benchmark/stack.ru
148
+ test/exec/README
149
+ test/exec/test_exec.rb
150
+ test/test_helper.rb
151
+ test/unit/test_configurator.rb
152
+ test/unit/test_droplet.rb
153
+ test/unit/test_http_parser.rb
154
+ test/unit/test_http_parser_ng.rb
155
+ test/unit/test_http_parser_xftrust.rb
156
+ test/unit/test_request.rb
157
+ test/unit/test_response.rb
158
+ test/unit/test_server.rb
159
+ test/unit/test_signals.rb
160
+ test/unit/test_sni_hostnames.rb
161
+ test/unit/test_socket_helper.rb
162
+ test/unit/test_stream_input.rb
163
+ test/unit/test_tee_input.rb
164
+ test/unit/test_upload.rb
165
+ test/unit/test_util.rb
166
+ unicorn.gemspec
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