unicorn-maintained 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) 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 +149 -0
  8. data/.olddoc.yml +25 -0
  9. data/Application_Timeouts +77 -0
  10. data/CONTRIBUTORS +39 -0
  11. data/COPYING +674 -0
  12. data/DESIGN +99 -0
  13. data/Documentation/.gitignore +3 -0
  14. data/Documentation/unicorn.1 +222 -0
  15. data/Documentation/unicorn_rails.1 +207 -0
  16. data/FAQ +70 -0
  17. data/GIT-VERSION-FILE +1 -0
  18. data/GIT-VERSION-GEN +39 -0
  19. data/GNUmakefile +317 -0
  20. data/HACKING +112 -0
  21. data/ISSUES +102 -0
  22. data/KNOWN_ISSUES +79 -0
  23. data/LATEST +1 -0
  24. data/LICENSE +67 -0
  25. data/Links +58 -0
  26. data/NEWS +1 -0
  27. data/PHILOSOPHY +139 -0
  28. data/README +156 -0
  29. data/Rakefile +16 -0
  30. data/SIGNALS +123 -0
  31. data/Sandbox +104 -0
  32. data/TODO +3 -0
  33. data/TUNING +119 -0
  34. data/archive/.gitignore +3 -0
  35. data/archive/slrnpull.conf +4 -0
  36. data/bin/unicorn +128 -0
  37. data/bin/unicorn_rails +209 -0
  38. data/examples/big_app_gc.rb +2 -0
  39. data/examples/echo.ru +26 -0
  40. data/examples/init.sh +102 -0
  41. data/examples/logger_mp_safe.rb +25 -0
  42. data/examples/logrotate.conf +44 -0
  43. data/examples/nginx.conf +156 -0
  44. data/examples/unicorn.conf.minimal.rb +13 -0
  45. data/examples/unicorn.conf.rb +110 -0
  46. data/examples/unicorn.socket +11 -0
  47. data/examples/unicorn@.service +40 -0
  48. data/ext/unicorn_http/CFLAGS +13 -0
  49. data/ext/unicorn_http/c_util.h +116 -0
  50. data/ext/unicorn_http/common_field_optimization.h +128 -0
  51. data/ext/unicorn_http/epollexclusive.h +128 -0
  52. data/ext/unicorn_http/ext_help.h +38 -0
  53. data/ext/unicorn_http/extconf.rb +39 -0
  54. data/ext/unicorn_http/global_variables.h +97 -0
  55. data/ext/unicorn_http/httpdate.c +91 -0
  56. data/ext/unicorn_http/unicorn_http.c +4334 -0
  57. data/ext/unicorn_http/unicorn_http.rl +1040 -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 +748 -0
  63. data/lib/unicorn/const.rb +21 -0
  64. data/lib/unicorn/http_request.rb +201 -0
  65. data/lib/unicorn/http_response.rb +93 -0
  66. data/lib/unicorn/http_server.rb +859 -0
  67. data/lib/unicorn/launcher.rb +62 -0
  68. data/lib/unicorn/oob_gc.rb +81 -0
  69. data/lib/unicorn/preread_input.rb +33 -0
  70. data/lib/unicorn/select_waiter.rb +6 -0
  71. data/lib/unicorn/socket_helper.rb +185 -0
  72. data/lib/unicorn/stream_input.rb +151 -0
  73. data/lib/unicorn/tee_input.rb +131 -0
  74. data/lib/unicorn/tmpio.rb +33 -0
  75. data/lib/unicorn/util.rb +90 -0
  76. data/lib/unicorn/version.rb +1 -0
  77. data/lib/unicorn/worker.rb +165 -0
  78. data/lib/unicorn.rb +136 -0
  79. data/man/man1/unicorn.1 +222 -0
  80. data/man/man1/unicorn_rails.1 +207 -0
  81. data/setup.rb +1586 -0
  82. data/t/.gitignore +4 -0
  83. data/t/GNUmakefile +5 -0
  84. data/t/README +49 -0
  85. data/t/active-unix-socket.t +117 -0
  86. data/t/bin/unused_listen +40 -0
  87. data/t/broken-app.ru +12 -0
  88. data/t/client_body_buffer_size.ru +14 -0
  89. data/t/client_body_buffer_size.t +80 -0
  90. data/t/detach.ru +11 -0
  91. data/t/env.ru +3 -0
  92. data/t/fails-rack-lint.ru +5 -0
  93. data/t/heartbeat-timeout.ru +12 -0
  94. data/t/heartbeat-timeout.t +62 -0
  95. data/t/integration.ru +115 -0
  96. data/t/integration.t +356 -0
  97. data/t/lib.perl +258 -0
  98. data/t/listener_names.ru +4 -0
  99. data/t/my-tap-lib.sh +201 -0
  100. data/t/oob_gc.ru +17 -0
  101. data/t/oob_gc_path.ru +17 -0
  102. data/t/pid.ru +3 -0
  103. data/t/preread_input.ru +22 -0
  104. data/t/reload-bad-config.t +54 -0
  105. data/t/reopen-logs.ru +13 -0
  106. data/t/reopen-logs.t +39 -0
  107. data/t/t0008-back_out_of_upgrade.sh +110 -0
  108. data/t/t0009-broken-app.sh +56 -0
  109. data/t/t0010-reap-logging.sh +55 -0
  110. data/t/t0012-reload-empty-config.sh +86 -0
  111. data/t/t0013-rewindable-input-false.sh +24 -0
  112. data/t/t0013.ru +12 -0
  113. data/t/t0014-rewindable-input-true.sh +24 -0
  114. data/t/t0014.ru +12 -0
  115. data/t/t0015-configurator-internals.sh +25 -0
  116. data/t/t0020-at_exit-handler.sh +49 -0
  117. data/t/t0021-process_detach.sh +29 -0
  118. data/t/t0022-listener_names-preload_app.sh +32 -0
  119. data/t/t0300-no-default-middleware.sh +20 -0
  120. data/t/t0301-no-default-middleware-ignored-in-config.sh +25 -0
  121. data/t/t0301.ru +13 -0
  122. data/t/t9001-oob_gc.sh +47 -0
  123. data/t/t9002-oob_gc-path.sh +75 -0
  124. data/t/test-lib.sh +125 -0
  125. data/t/winch_ttin.t +67 -0
  126. data/t/working_directory.t +94 -0
  127. data/test/aggregate.rb +15 -0
  128. data/test/benchmark/README +60 -0
  129. data/test/benchmark/dd.ru +18 -0
  130. data/test/benchmark/ddstream.ru +50 -0
  131. data/test/benchmark/readinput.ru +40 -0
  132. data/test/benchmark/stack.ru +8 -0
  133. data/test/benchmark/uconnect.perl +66 -0
  134. data/test/exec/README +5 -0
  135. data/test/exec/test_exec.rb +1029 -0
  136. data/test/test_helper.rb +306 -0
  137. data/test/unit/test_ccc.rb +91 -0
  138. data/test/unit/test_configurator.rb +175 -0
  139. data/test/unit/test_droplet.rb +28 -0
  140. data/test/unit/test_http_parser.rb +884 -0
  141. data/test/unit/test_http_parser_ng.rb +714 -0
  142. data/test/unit/test_request.rb +169 -0
  143. data/test/unit/test_server.rb +244 -0
  144. data/test/unit/test_signals.rb +188 -0
  145. data/test/unit/test_socket_helper.rb +159 -0
  146. data/test/unit/test_stream_input.rb +210 -0
  147. data/test/unit/test_tee_input.rb +303 -0
  148. data/test/unit/test_util.rb +131 -0
  149. data/test/unit/test_waiter.rb +34 -0
  150. data/unicorn.gemspec +48 -0
  151. metadata +275 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7c75e94db956bea211bebcc0c34b0f583c9e9b160d88f9fceb4c4d2092181324
4
+ data.tar.gz: 551cc9a67a1deacf01c132dfdee239b0d65d792cd9fcc3598386ad5aeeb71766
5
+ SHA512:
6
+ metadata.gz: 7afd02e9a2879ee1517bc956cdc77d956aaad4cae719ff4b94e705f071915447547ca0a41ce0c23e3d1bb2ac7eee23440d12c667eb9b6bd1641db26f4e9aae37
7
+ data.tar.gz: e690393269639c61335cd7c0a20728a18666f717d069bb2fe15eda1a46380340aa63e9099e3eba56f368825b3a36d9948f4029caa42afa20e2a221cdbd387481
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,149 @@
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/unicorn.1
14
+ Documentation/unicorn_rails.1
15
+ FAQ
16
+ GIT-VERSION-FILE
17
+ GIT-VERSION-GEN
18
+ GNUmakefile
19
+ HACKING
20
+ ISSUES
21
+ KNOWN_ISSUES
22
+ LATEST
23
+ LICENSE
24
+ Links
25
+ NEWS
26
+ PHILOSOPHY
27
+ README
28
+ Rakefile
29
+ SIGNALS
30
+ Sandbox
31
+ TODO
32
+ TUNING
33
+ archive/.gitignore
34
+ archive/slrnpull.conf
35
+ bin/unicorn
36
+ bin/unicorn_rails
37
+ examples/big_app_gc.rb
38
+ examples/echo.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
+ examples/unicorn.socket
46
+ examples/unicorn@.service
47
+ ext/unicorn_http/CFLAGS
48
+ ext/unicorn_http/c_util.h
49
+ ext/unicorn_http/common_field_optimization.h
50
+ ext/unicorn_http/epollexclusive.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/select_waiter.rb
71
+ lib/unicorn/socket_helper.rb
72
+ lib/unicorn/stream_input.rb
73
+ lib/unicorn/tee_input.rb
74
+ lib/unicorn/tmpio.rb
75
+ lib/unicorn/util.rb
76
+ lib/unicorn/version.rb
77
+ lib/unicorn/worker.rb
78
+ man/man1/unicorn.1
79
+ man/man1/unicorn_rails.1
80
+ setup.rb
81
+ t/.gitignore
82
+ t/GNUmakefile
83
+ t/README
84
+ t/active-unix-socket.t
85
+ t/bin/unused_listen
86
+ t/broken-app.ru
87
+ t/client_body_buffer_size.ru
88
+ t/client_body_buffer_size.t
89
+ t/detach.ru
90
+ t/env.ru
91
+ t/fails-rack-lint.ru
92
+ t/heartbeat-timeout.ru
93
+ t/heartbeat-timeout.t
94
+ t/integration.ru
95
+ t/integration.t
96
+ t/lib.perl
97
+ t/listener_names.ru
98
+ t/my-tap-lib.sh
99
+ t/oob_gc.ru
100
+ t/oob_gc_path.ru
101
+ t/pid.ru
102
+ t/preread_input.ru
103
+ t/reload-bad-config.t
104
+ t/reopen-logs.ru
105
+ t/reopen-logs.t
106
+ t/t0008-back_out_of_upgrade.sh
107
+ t/t0009-broken-app.sh
108
+ t/t0010-reap-logging.sh
109
+ t/t0012-reload-empty-config.sh
110
+ t/t0013-rewindable-input-false.sh
111
+ t/t0013.ru
112
+ t/t0014-rewindable-input-true.sh
113
+ t/t0014.ru
114
+ t/t0015-configurator-internals.sh
115
+ t/t0020-at_exit-handler.sh
116
+ t/t0021-process_detach.sh
117
+ t/t0022-listener_names-preload_app.sh
118
+ t/t0300-no-default-middleware.sh
119
+ t/t0301-no-default-middleware-ignored-in-config.sh
120
+ t/t0301.ru
121
+ t/t9001-oob_gc.sh
122
+ t/t9002-oob_gc-path.sh
123
+ t/test-lib.sh
124
+ t/winch_ttin.t
125
+ t/working_directory.t
126
+ test/aggregate.rb
127
+ test/benchmark/README
128
+ test/benchmark/dd.ru
129
+ test/benchmark/ddstream.ru
130
+ test/benchmark/readinput.ru
131
+ test/benchmark/stack.ru
132
+ test/benchmark/uconnect.perl
133
+ test/exec/README
134
+ test/exec/test_exec.rb
135
+ test/test_helper.rb
136
+ test/unit/test_ccc.rb
137
+ test/unit/test_configurator.rb
138
+ test/unit/test_droplet.rb
139
+ test/unit/test_http_parser.rb
140
+ test/unit/test_http_parser_ng.rb
141
+ test/unit/test_request.rb
142
+ test/unit/test_server.rb
143
+ test/unit/test_signals.rb
144
+ test/unit/test_socket_helper.rb
145
+ test/unit/test_stream_input.rb
146
+ test/unit/test_tee_input.rb
147
+ test/unit/test_util.rb
148
+ test/unit/test_waiter.rb
149
+ unicorn.gemspec
data/.olddoc.yml ADDED
@@ -0,0 +1,25 @@
1
+ ---
2
+ cgit_url: https://yhbt.net/unicorn.git
3
+ rdoc_url: https://yhbt.net/unicorn/
4
+ ml_url:
5
+ - https://yhbt.net/unicorn-public/
6
+ - http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn-public/
7
+ merge_html:
8
+ unicorn_1: Documentation/unicorn.1.html
9
+ unicorn_rails_1: Documentation/unicorn_rails.1.html
10
+ noindex:
11
+ - Unicorn::Const
12
+ - LATEST
13
+ - TODO
14
+ - unicorn_rails_1
15
+ public_email: unicorn-public@yhbt.net
16
+ imap_url:
17
+ - imaps://;AUTH=ANONYMOUS@yhbt.net/inbox.comp.lang.ruby.unicorn.0
18
+ - imap://;AUTH=ANONYMOUS@7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn.0
19
+ nntp_url:
20
+ - nntps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
21
+ - nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn
22
+ - nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
23
+ source_code:
24
+ - git clone https://yhbt.net/unicorn.git
25
+ - torsocks git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn.git
@@ -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}[https://memcached.org/],
27
+ {dalli}[https://rubygems.org/gems/dalli],
28
+ {memcached}[https://rubygems.org/gems/memcached] and
29
+ {memcache-client}[https://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,39 @@
1
+ Unicorn developers (let us know if we forgot you, ...or if you no longer wish
2
+ to be associated with the doofus running this disaster :P):
3
+ * Eric Wong (Bozo Doofus For Life, Bastard Operator From Hell)
4
+
5
+ There's numerous contributors over email the years, all of our mail
6
+ is archived @ https://yhbt.net/unicorn-public/
7
+ * Suraj N. Kurapati
8
+ * Andrey Stikheev
9
+ * Wayne Larsen
10
+ * Iñaki Baz Castillo
11
+ * Augusto Becciu
12
+ * Hongli Lai
13
+ * ... (help wanted)
14
+
15
+ We would like to thank following folks for helping make Unicorn possible:
16
+
17
+ * Ezra Zygmuntowicz - for helping Eric decide on a sane configuration
18
+ format and reasonable defaults.
19
+ * Christian Neukirchen - for Rack, which let us put more focus on the server
20
+ and drastically cut down on the amount of code we have to maintain.
21
+ * Zed A. Shaw - for Mongrel, without which Unicorn would not be possible
22
+
23
+ The original Mongrel contributors:
24
+
25
+ * Luis Lavena
26
+ * Wilson Bilkovich
27
+ * why the lucky stiff
28
+ * Dan Kubb
29
+ * MenTaLguY
30
+ * Filipe Lautert
31
+ * Rick Olson
32
+ * Wayne E. Seguin
33
+ * Kirk Haines
34
+ * Bradley Taylor
35
+ * Matt Pelletier
36
+ * Ry Dahl
37
+ * Nick Sieger
38
+ * Evan Weaver
39
+ * Marc-André Cournoyer