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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8233befe487ff25246272c73d770f44c5949e018
4
+ data.tar.gz: aa6d378ca633852e97c9f96429bb56cdab638ca8
5
+ SHA512:
6
+ metadata.gz: 92eb896198b0c0b77d7c7c668aba1e61b2149e5d7d69f61bb371f7a2b8ddcf990c43f26ca1353c81f2f03e7f76d1d336b0c7e037a5fd120684e3b6b579c1ab3f
7
+ data.tar.gz: af4a1c80b5be6e12ee7498acd280d575e6cc47e61d6d89878d860e19e18683cd74e8d4f40b12efd759e24fed5a543b242442fc5114473aafa82bc878d9da8ade
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,28 @@
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
+ LATEST
14
+ lib/unicorn.rb
15
+ lib/unicorn/configurator.rb
16
+ lib/unicorn/http_server.rb
17
+ lib/unicorn/preread_input.rb
18
+ lib/unicorn/stream_input.rb
19
+ lib/unicorn/tee_input.rb
20
+ lib/unicorn/util.rb
21
+ lib/unicorn/oob_gc.rb
22
+ lib/unicorn/worker.rb
23
+ unicorn_1
24
+ unicorn_rails_1
25
+ ISSUES
26
+ Sandbox
27
+ Links
28
+ Application_Timeouts
data/.gitattributes ADDED
@@ -0,0 +1,5 @@
1
+ *.gemspec diff=ruby
2
+ *.rb diff=ruby
3
+ *.ru diff=ruby
4
+ Rakefile diff=ruby
5
+ bin/* diff=ruby
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
+ /.manifest
20
+ /GIT-VERSION-FILE
21
+ /man
22
+ /tmp
23
+ /LATEST
24
+ /lib/unicorn/version.rb
25
+ /*_1
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,156 @@
1
+ .CHANGELOG.old
2
+ .document
3
+ .gitattributes
4
+ .gitignore
5
+ .mailmap
6
+ .manifest
7
+ .olddoc.yml
8
+ Application_Timeouts
9
+ CONTRIBUTORS
10
+ COPYING
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
+ archive/.gitignore
35
+ archive/slrnpull.conf
36
+ bin/unicorn
37
+ bin/unicorn_rails
38
+ examples/big_app_gc.rb
39
+ examples/echo.ru
40
+ examples/init.sh
41
+ examples/logger_mp_safe.rb
42
+ examples/logrotate.conf
43
+ examples/nginx.conf
44
+ examples/unicorn.conf.minimal.rb
45
+ examples/unicorn.conf.rb
46
+ examples/unicorn.socket
47
+ examples/unicorn@.service
48
+ ext/unicorn_http/CFLAGS
49
+ ext/unicorn_http/c_util.h
50
+ ext/unicorn_http/common_field_optimization.h
51
+ ext/unicorn_http/ext_help.h
52
+ ext/unicorn_http/extconf.rb
53
+ ext/unicorn_http/global_variables.h
54
+ ext/unicorn_http/httpdate.c
55
+ ext/unicorn_http/unicorn_http.c
56
+ ext/unicorn_http/unicorn_http.rl
57
+ ext/unicorn_http/unicorn_http_common.rl
58
+ lib/unicorn.rb
59
+ lib/unicorn/app/old_rails.rb
60
+ lib/unicorn/app/old_rails/static.rb
61
+ lib/unicorn/cgi_wrapper.rb
62
+ lib/unicorn/configurator.rb
63
+ lib/unicorn/const.rb
64
+ lib/unicorn/http_request.rb
65
+ lib/unicorn/http_response.rb
66
+ lib/unicorn/http_server.rb
67
+ lib/unicorn/launcher.rb
68
+ lib/unicorn/oob_gc.rb
69
+ lib/unicorn/preread_input.rb
70
+ lib/unicorn/socket_helper.rb
71
+ lib/unicorn/stream_input.rb
72
+ lib/unicorn/tee_input.rb
73
+ lib/unicorn/tmpio.rb
74
+ lib/unicorn/util.rb
75
+ lib/unicorn/version.rb
76
+ lib/unicorn/worker.rb
77
+ man/man1/unicorn.1
78
+ man/man1/unicorn_rails.1
79
+ setup.rb
80
+ t/.gitignore
81
+ t/GNUmakefile
82
+ t/README
83
+ t/bin/content-md5-put
84
+ t/bin/sha1sum.rb
85
+ t/bin/unused_listen
86
+ t/broken-app.ru
87
+ t/detach.ru
88
+ t/env.ru
89
+ t/fails-rack-lint.ru
90
+ t/heartbeat-timeout.ru
91
+ t/hijack.ru
92
+ t/listener_names.ru
93
+ t/my-tap-lib.sh
94
+ t/oob_gc.ru
95
+ t/oob_gc_path.ru
96
+ t/pid.ru
97
+ t/preread_input.ru
98
+ t/rack-input-tests.ru
99
+ t/t0000-http-basic.sh
100
+ t/t0001-reload-bad-config.sh
101
+ t/t0002-config-conflict.sh
102
+ t/t0002-parser-error.sh
103
+ t/t0003-working_directory.sh
104
+ t/t0004-heartbeat-timeout.sh
105
+ t/t0004-working_directory_broken.sh
106
+ t/t0005-working_directory_app.rb.sh
107
+ t/t0006-reopen-logs.sh
108
+ t/t0006.ru
109
+ t/t0007-working_directory_no_embed_cli.sh
110
+ t/t0008-back_out_of_upgrade.sh
111
+ t/t0009-broken-app.sh
112
+ t/t0009-winch_ttin.sh
113
+ t/t0010-reap-logging.sh
114
+ t/t0011-active-unix-socket.sh
115
+ t/t0012-reload-empty-config.sh
116
+ t/t0013-rewindable-input-false.sh
117
+ t/t0013.ru
118
+ t/t0014-rewindable-input-true.sh
119
+ t/t0014.ru
120
+ t/t0015-configurator-internals.sh
121
+ t/t0018-write-on-close.sh
122
+ t/t0019-max_header_len.sh
123
+ t/t0020-at_exit-handler.sh
124
+ t/t0021-process_detach.sh
125
+ t/t0022-listener_names-preload_app.sh
126
+ t/t0100-rack-input-tests.sh
127
+ t/t0116-client_body_buffer_size.sh
128
+ t/t0116.ru
129
+ t/t0200-rack-hijack.sh
130
+ t/t0300-no-default-middleware.sh
131
+ t/t9000-preread-input.sh
132
+ t/t9001-oob_gc.sh
133
+ t/t9002-oob_gc-path.sh
134
+ t/test-lib.sh
135
+ t/write-on-close.ru
136
+ test/aggregate.rb
137
+ test/benchmark/README
138
+ test/benchmark/dd.ru
139
+ test/benchmark/stack.ru
140
+ test/exec/README
141
+ test/exec/test_exec.rb
142
+ test/test_helper.rb
143
+ test/unit/test_configurator.rb
144
+ test/unit/test_droplet.rb
145
+ test/unit/test_http_parser.rb
146
+ test/unit/test_http_parser_ng.rb
147
+ test/unit/test_request.rb
148
+ test/unit/test_response.rb
149
+ test/unit/test_server.rb
150
+ test/unit/test_signals.rb
151
+ test/unit/test_socket_helper.rb
152
+ test/unit/test_stream_input.rb
153
+ test/unit/test_tee_input.rb
154
+ test/unit/test_upload.rb
155
+ test/unit/test_util.rb
156
+ unicorn.gemspec
data/.olddoc.yml ADDED
@@ -0,0 +1,18 @@
1
+ ---
2
+ cgit_url: https://bogomips.org/unicorn.git
3
+ git_url: git://bogomips.org/unicorn.git
4
+ rdoc_url: https://bogomips.org/unicorn/
5
+ ml_url: https://bogomips.org/unicorn-public/
6
+ merge_html:
7
+ unicorn_1: Documentation/unicorn.1.html
8
+ unicorn_rails_1: Documentation/unicorn_rails.1.html
9
+ noindex:
10
+ - Unicorn::Const
11
+ - LATEST
12
+ - TODO
13
+ - unicorn_rails_1
14
+ public_email: unicorn-public@bogomips.org
15
+ private_email: unicorn@bogomips.org
16
+ nntp_url:
17
+ - nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
18
+ - nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
@@ -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