unicorn-maintained 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.CHANGELOG.old +25 -0
- data/.document +28 -0
- data/.gitattributes +5 -0
- data/.gitignore +25 -0
- data/.mailmap +26 -0
- data/.manifest +149 -0
- data/.olddoc.yml +25 -0
- data/Application_Timeouts +77 -0
- data/CONTRIBUTORS +39 -0
- data/COPYING +674 -0
- data/DESIGN +99 -0
- data/Documentation/.gitignore +3 -0
- data/Documentation/unicorn.1 +222 -0
- data/Documentation/unicorn_rails.1 +207 -0
- data/FAQ +70 -0
- data/GIT-VERSION-FILE +1 -0
- data/GIT-VERSION-GEN +39 -0
- data/GNUmakefile +317 -0
- data/HACKING +112 -0
- data/ISSUES +102 -0
- data/KNOWN_ISSUES +79 -0
- data/LATEST +1 -0
- data/LICENSE +67 -0
- data/Links +58 -0
- data/NEWS +1 -0
- data/PHILOSOPHY +139 -0
- data/README +156 -0
- data/Rakefile +16 -0
- data/SIGNALS +123 -0
- data/Sandbox +104 -0
- data/TODO +3 -0
- data/TUNING +119 -0
- data/archive/.gitignore +3 -0
- data/archive/slrnpull.conf +4 -0
- data/bin/unicorn +128 -0
- data/bin/unicorn_rails +209 -0
- data/examples/big_app_gc.rb +2 -0
- data/examples/echo.ru +26 -0
- data/examples/init.sh +102 -0
- data/examples/logger_mp_safe.rb +25 -0
- data/examples/logrotate.conf +44 -0
- data/examples/nginx.conf +156 -0
- data/examples/unicorn.conf.minimal.rb +13 -0
- data/examples/unicorn.conf.rb +110 -0
- data/examples/unicorn.socket +11 -0
- data/examples/unicorn@.service +40 -0
- data/ext/unicorn_http/CFLAGS +13 -0
- data/ext/unicorn_http/c_util.h +116 -0
- data/ext/unicorn_http/common_field_optimization.h +128 -0
- data/ext/unicorn_http/epollexclusive.h +128 -0
- data/ext/unicorn_http/ext_help.h +38 -0
- data/ext/unicorn_http/extconf.rb +39 -0
- data/ext/unicorn_http/global_variables.h +97 -0
- data/ext/unicorn_http/httpdate.c +91 -0
- data/ext/unicorn_http/unicorn_http.c +4334 -0
- data/ext/unicorn_http/unicorn_http.rl +1040 -0
- data/ext/unicorn_http/unicorn_http_common.rl +76 -0
- data/lib/unicorn/app/old_rails/static.rb +59 -0
- data/lib/unicorn/app/old_rails.rb +35 -0
- data/lib/unicorn/cgi_wrapper.rb +147 -0
- data/lib/unicorn/configurator.rb +748 -0
- data/lib/unicorn/const.rb +21 -0
- data/lib/unicorn/http_request.rb +201 -0
- data/lib/unicorn/http_response.rb +93 -0
- data/lib/unicorn/http_server.rb +859 -0
- data/lib/unicorn/launcher.rb +62 -0
- data/lib/unicorn/oob_gc.rb +81 -0
- data/lib/unicorn/preread_input.rb +33 -0
- data/lib/unicorn/select_waiter.rb +6 -0
- data/lib/unicorn/socket_helper.rb +185 -0
- data/lib/unicorn/stream_input.rb +151 -0
- data/lib/unicorn/tee_input.rb +131 -0
- data/lib/unicorn/tmpio.rb +33 -0
- data/lib/unicorn/util.rb +90 -0
- data/lib/unicorn/version.rb +1 -0
- data/lib/unicorn/worker.rb +165 -0
- data/lib/unicorn.rb +136 -0
- data/man/man1/unicorn.1 +222 -0
- data/man/man1/unicorn_rails.1 +207 -0
- data/setup.rb +1586 -0
- data/t/.gitignore +4 -0
- data/t/GNUmakefile +5 -0
- data/t/README +49 -0
- data/t/active-unix-socket.t +117 -0
- data/t/bin/unused_listen +40 -0
- data/t/broken-app.ru +12 -0
- data/t/client_body_buffer_size.ru +14 -0
- data/t/client_body_buffer_size.t +80 -0
- data/t/detach.ru +11 -0
- data/t/env.ru +3 -0
- data/t/fails-rack-lint.ru +5 -0
- data/t/heartbeat-timeout.ru +12 -0
- data/t/heartbeat-timeout.t +62 -0
- data/t/integration.ru +115 -0
- data/t/integration.t +356 -0
- data/t/lib.perl +258 -0
- data/t/listener_names.ru +4 -0
- data/t/my-tap-lib.sh +201 -0
- data/t/oob_gc.ru +17 -0
- data/t/oob_gc_path.ru +17 -0
- data/t/pid.ru +3 -0
- data/t/preread_input.ru +22 -0
- data/t/reload-bad-config.t +54 -0
- data/t/reopen-logs.ru +13 -0
- data/t/reopen-logs.t +39 -0
- data/t/t0008-back_out_of_upgrade.sh +110 -0
- data/t/t0009-broken-app.sh +56 -0
- data/t/t0010-reap-logging.sh +55 -0
- data/t/t0012-reload-empty-config.sh +86 -0
- data/t/t0013-rewindable-input-false.sh +24 -0
- data/t/t0013.ru +12 -0
- data/t/t0014-rewindable-input-true.sh +24 -0
- data/t/t0014.ru +12 -0
- data/t/t0015-configurator-internals.sh +25 -0
- data/t/t0020-at_exit-handler.sh +49 -0
- data/t/t0021-process_detach.sh +29 -0
- data/t/t0022-listener_names-preload_app.sh +32 -0
- data/t/t0300-no-default-middleware.sh +20 -0
- data/t/t0301-no-default-middleware-ignored-in-config.sh +25 -0
- data/t/t0301.ru +13 -0
- data/t/t9001-oob_gc.sh +47 -0
- data/t/t9002-oob_gc-path.sh +75 -0
- data/t/test-lib.sh +125 -0
- data/t/winch_ttin.t +67 -0
- data/t/working_directory.t +94 -0
- data/test/aggregate.rb +15 -0
- data/test/benchmark/README +60 -0
- data/test/benchmark/dd.ru +18 -0
- data/test/benchmark/ddstream.ru +50 -0
- data/test/benchmark/readinput.ru +40 -0
- data/test/benchmark/stack.ru +8 -0
- data/test/benchmark/uconnect.perl +66 -0
- data/test/exec/README +5 -0
- data/test/exec/test_exec.rb +1029 -0
- data/test/test_helper.rb +306 -0
- data/test/unit/test_ccc.rb +91 -0
- data/test/unit/test_configurator.rb +175 -0
- data/test/unit/test_droplet.rb +28 -0
- data/test/unit/test_http_parser.rb +884 -0
- data/test/unit/test_http_parser_ng.rb +714 -0
- data/test/unit/test_request.rb +169 -0
- data/test/unit/test_server.rb +244 -0
- data/test/unit/test_signals.rb +188 -0
- data/test/unit/test_socket_helper.rb +159 -0
- data/test/unit/test_stream_input.rb +210 -0
- data/test/unit/test_tee_input.rb +303 -0
- data/test/unit/test_util.rb +131 -0
- data/test/unit/test_waiter.rb +34 -0
- data/unicorn.gemspec +48 -0
- 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
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
|