unicorn 4.8.3 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +5 -5
  2. data/.document +0 -1
  3. data/.gitattributes +5 -0
  4. data/.gitignore +2 -2
  5. data/.manifest +15 -19
  6. data/.olddoc.yml +25 -0
  7. data/Application_Timeouts +7 -7
  8. data/CONTRIBUTORS +6 -2
  9. data/DESIGN +2 -4
  10. data/Documentation/.gitignore +1 -3
  11. data/Documentation/unicorn.1 +222 -0
  12. data/Documentation/unicorn_rails.1 +207 -0
  13. data/FAQ +23 -6
  14. data/GIT-VERSION-FILE +1 -1
  15. data/GIT-VERSION-GEN +1 -1
  16. data/GNUmakefile +138 -92
  17. data/HACKING +5 -30
  18. data/ISSUES +73 -36
  19. data/KNOWN_ISSUES +18 -18
  20. data/LATEST +16 -22
  21. data/LICENSE +2 -2
  22. data/Links +24 -22
  23. data/NEWS +771 -0
  24. data/PHILOSOPHY +0 -6
  25. data/README +48 -42
  26. data/Rakefile +0 -44
  27. data/SIGNALS +2 -2
  28. data/Sandbox +11 -10
  29. data/TODO +0 -2
  30. data/TUNING +30 -9
  31. data/archive/slrnpull.conf +1 -1
  32. data/bin/unicorn +4 -2
  33. data/bin/unicorn_rails +3 -3
  34. data/examples/big_app_gc.rb +1 -1
  35. data/examples/init.sh +36 -8
  36. data/examples/logrotate.conf +17 -2
  37. data/examples/nginx.conf +14 -14
  38. data/examples/unicorn.conf.minimal.rb +2 -2
  39. data/examples/unicorn.conf.rb +14 -6
  40. data/examples/unicorn.socket +11 -0
  41. data/examples/unicorn@.service +40 -0
  42. data/ext/unicorn_http/c_util.h +5 -13
  43. data/ext/unicorn_http/common_field_optimization.h +22 -5
  44. data/ext/unicorn_http/epollexclusive.h +124 -0
  45. data/ext/unicorn_http/ext_help.h +0 -44
  46. data/ext/unicorn_http/extconf.rb +32 -5
  47. data/ext/unicorn_http/global_variables.h +2 -2
  48. data/ext/unicorn_http/httpdate.c +3 -2
  49. data/ext/unicorn_http/unicorn_http.c +926 -638
  50. data/ext/unicorn_http/unicorn_http.rl +159 -170
  51. data/ext/unicorn_http/unicorn_http_common.rl +1 -1
  52. data/lib/unicorn/configurator.rb +110 -46
  53. data/lib/unicorn/const.rb +2 -25
  54. data/lib/unicorn/http_request.rb +110 -31
  55. data/lib/unicorn/http_response.rb +17 -31
  56. data/lib/unicorn/http_server.rb +259 -179
  57. data/lib/unicorn/launcher.rb +1 -1
  58. data/lib/unicorn/oob_gc.rb +6 -6
  59. data/lib/unicorn/select_waiter.rb +6 -0
  60. data/lib/unicorn/socket_helper.rb +58 -78
  61. data/lib/unicorn/stream_input.rb +8 -7
  62. data/lib/unicorn/tee_input.rb +16 -11
  63. data/lib/unicorn/tmpio.rb +10 -6
  64. data/lib/unicorn/util.rb +5 -4
  65. data/lib/unicorn/version.rb +1 -1
  66. data/lib/unicorn/worker.rb +36 -23
  67. data/lib/unicorn.rb +64 -44
  68. data/man/man1/unicorn.1 +124 -112
  69. data/man/man1/unicorn_rails.1 +106 -107
  70. data/t/GNUmakefile +3 -76
  71. data/t/README +4 -4
  72. data/t/t0002-parser-error.sh +3 -3
  73. data/t/t0011-active-unix-socket.sh +1 -1
  74. data/t/t0012-reload-empty-config.sh +2 -1
  75. data/t/t0301-no-default-middleware-ignored-in-config.sh +25 -0
  76. data/t/t0301.ru +13 -0
  77. data/t/test-lib.sh +4 -3
  78. data/test/benchmark/README +14 -4
  79. data/test/benchmark/ddstream.ru +50 -0
  80. data/test/benchmark/readinput.ru +40 -0
  81. data/test/benchmark/uconnect.perl +66 -0
  82. data/test/exec/test_exec.rb +74 -20
  83. data/test/test_helper.rb +42 -33
  84. data/test/unit/test_ccc.rb +91 -0
  85. data/test/unit/test_droplet.rb +1 -1
  86. data/test/unit/test_http_parser.rb +49 -19
  87. data/test/unit/test_http_parser_ng.rb +98 -115
  88. data/test/unit/test_request.rb +11 -11
  89. data/test/unit/test_response.rb +31 -19
  90. data/test/unit/test_server.rb +89 -15
  91. data/test/unit/test_signals.rb +9 -9
  92. data/test/unit/test_socket_helper.rb +16 -12
  93. data/test/unit/test_tee_input.rb +10 -0
  94. data/test/unit/test_upload.rb +10 -15
  95. data/test/unit/test_util.rb +32 -6
  96. data/test/unit/test_waiter.rb +34 -0
  97. data/unicorn.gemspec +28 -23
  98. data/unicorn_1 +1 -0
  99. data/unicorn_rails_1 +1 -0
  100. metadata +37 -58
  101. data/.wrongdoc.yml +0 -11
  102. data/ChangeLog +0 -5027
  103. data/Documentation/GNUmakefile +0 -30
  104. data/Documentation/unicorn.1.txt +0 -178
  105. data/Documentation/unicorn_rails.1.txt +0 -175
  106. data/examples/git.ru +0 -13
  107. data/lib/unicorn/app/exec_cgi.rb +0 -154
  108. data/lib/unicorn/app/inetd.rb +0 -109
  109. data/lib/unicorn/ssl_client.rb +0 -11
  110. data/lib/unicorn/ssl_configurator.rb +0 -104
  111. data/lib/unicorn/ssl_server.rb +0 -42
  112. data/local.mk.sample +0 -59
  113. data/script/isolate_for_tests +0 -31
  114. data/t/hijack.ru +0 -42
  115. data/t/t0016-trust-x-forwarded-false.sh +0 -30
  116. data/t/t0017-trust-x-forwarded-true.sh +0 -30
  117. data/t/t0200-rack-hijack.sh +0 -27
  118. data/test/unit/test_http_parser_xftrust.rb +0 -38
  119. data/test/unit/test_sni_hostnames.rb +0 -47
data/NEWS CHANGED
@@ -1,3 +1,774 @@
1
+ === unicorn 6.0.0 - no more recycling Rack env / 2021-03-17 06:38 UTC
2
+
3
+ This release allocates a new Rack `env' hash for every request.
4
+ This is done for safety with internally-(thread|event)-using Rack
5
+ apps which expect to use `env' after the normal Rack response is
6
+ complete, but without relying on rack.hijack[1]. Thanks to
7
+ Dirkjan Bussink <d.bussink@gmail.com> for the patch:
8
+
9
+ https://yhbt.net/unicorn-public/66A68DD8-83EF-4C7A-80E8-3F1F7AB31670@github.com/
10
+
11
+ The major version is bumped since:
12
+
13
+ 1) there are performance regressions for some simple Rack apps
14
+
15
+ 2) unsupported 3rd-party monkey patches which previously
16
+ relied on this behavior may be broken (our version of
17
+ OobGC was).
18
+
19
+ The test suite is also more reliable on multi-core systems
20
+ and Ruby 3.x.
21
+
22
+ [1] thread from 2017 around rack.hijack safety:
23
+ https://yhbt.net/unicorn-public/CAAtdryPG3nLuyo0jxfYW1YHu1Q+ZpkLkd4KdWC8vA46B5haZxw@mail.gmail.com/
24
+
25
+ === unicorn 5.8.0 - rack.after_reply support / 2020-12-24 20:39 UTC
26
+
27
+ This release supports env['rack.after_reply'] which allows
28
+ rack middleware to pass lambdas to be executed after the client
29
+ connection is closed, matching functionality in Puma.
30
+
31
+ Thanks to Blake Williams for this patch:
32
+ https://yhbt.net/unicorn-public/9873E53C-04D3-4759-9678-CA17DBAEF7B7@blakewilliams.me/
33
+
34
+ The top-level of our website is now simpler and no longer
35
+ redundant with the contents of https://yhbt.net/unicorn/README.html
36
+ (which contains the old content)
37
+
38
+ === unicorn 5.7.0 / 2020-09-08 08:41 UTC
39
+
40
+ Relaxed Ruby version requirements for Ruby 3.0.0dev.
41
+ Thanks to Jean Boussier for testing
42
+
43
+ === unicorn 5.6.0 - early_hints support / 2020-07-26 01:52 UTC
44
+
45
+ This release adds support for the early_hints configurator
46
+ directive for the 'rack.early_hints' API used by Rails 5.2+.
47
+
48
+ Thanks to Jean Boussier for the patch.
49
+
50
+ Link: https://yhbt.net/unicorn-public/242F0859-0F83-4F14-A0FF-5BE392BB01E6@shopify.com/
51
+
52
+ === unicorn 5.5.5 / 2020-04-27 02:48 UTC
53
+
54
+ This release fixes a bug for users of multiple listeners setups
55
+ where a busy listen socket could starve other listeners.
56
+
57
+ Thanks to Stan Hu for reporting and testing.
58
+
59
+ No need to upgrade if you're using a single listen socket.
60
+
61
+ Link: https://yhbt.net/unicorn-public/CAMBWrQ=Yh42MPtzJCEO7XryVknDNetRMuA87irWfqVuLdJmiBQ@mail.gmail.com/
62
+
63
+ === unicorn 5.5.4 / 2020-03-24 22:10 UTC
64
+
65
+ One change to improve RFC 7230 conformance in the HTTP parser:
66
+
67
+ https://yhbt.net/unicorn-public/20200319022823.32472-1-bofh@yhbt.net/
68
+
69
+ === unicorn 5.5.3 / 2020-01-31 20:39 UTC
70
+
71
+ Documentation updates to switch bogomips.org to yhbt.net since
72
+ the .org TLD won't be affordable in the near future.
73
+
74
+ There's also a few minor test cleanups.
75
+
76
+ === unicorn 5.5.2 / 2019-12-20 02:08 UTC
77
+
78
+ Thanks to Terry Scheingeld, we now workaround a Ruby bug
79
+ and can now run with taint checks enabled:
80
+ <https://bugs.ruby-lang.org/issues/14485>
81
+ <https://bogomips.org/unicorn-public/CABg1sXrvGv9G6CDQxePDUqTe6N-5UpLXm7eG3YQO=dda-Cgg7A@mail.gmail.com/>
82
+
83
+ There's also a few documentation updates and building packages
84
+ from source is easier since pandoc is no longer a dependency
85
+ (and I can no longer afford the bandwidth or space to install
86
+ it).
87
+
88
+ Eric Wong (7):
89
+ test/benchmark/ddstream: demo for slowly reading clients
90
+ test/benchmark/readinput: demo for slowly uploading clients
91
+ test/benchmark/uconnect: test for accept loop speed
92
+ examples/unicorn@.service: note the NonBlocking flag
93
+ Merge remote-tracking branch 'origin/ts/tmpio'
94
+ test_util: get rid of some unused variables in tests
95
+ doc: replace pandoc-"Markdown" with real manpages
96
+
97
+ Terry Scheingeld (1):
98
+ tmpio: workaround File#path being tainted on unlink
99
+
100
+ === unicorn 5.5.1 / 2019-05-06 06:40 UTC
101
+
102
+ This release fixes and works around issues from v5.5.0 (2019-03-04)
103
+
104
+ Stephen Demjanenko worked around a pipe resource accounting bug
105
+ present in old Linux kernels. Linux 3.x users from 3.16.57 and
106
+ on are unaffected. Linux 4.x users from 4.9 and on are
107
+ unaffected.
108
+
109
+ https://bogomips.org/unicorn-public/1556922018-24096-1-git-send-email-sdemjanenko@gmail.com/
110
+
111
+ Stan Pitucha reported a bug with the old `unicorn_rails' wrapper
112
+ (intended for Rails 2.x users) which was promptly fixed by
113
+ Jeremy Evans:
114
+
115
+ https://bogomips.org/unicorn-public/CAJ2_uEPifcv_ux4sX=t0C4zHTHGhqVfcLcSB2kTU3Rb_6pQ3nw@mail.gmail.com/
116
+
117
+ There's also some doc updates to warn users off `unicorn_rails';
118
+ the homepage is now energy-efficient for OLEDs and CRTs;
119
+ and I'm no longer advertising mailing list subscriptions
120
+ (because I hate centralization and mail archives are the priority)
121
+
122
+ Eric Wong (3):
123
+ doc: unicorn_rails: clarify that it is intended for rails <= 2.x
124
+ doc: stop advertising mailing list subscription
125
+ doc: switch homepage to dark216
126
+
127
+ Jeremy Evans (1):
128
+ unicorn_rails: fix regression with Rails >= 3.x in app build
129
+
130
+ Stephen Demjanenko (1):
131
+ Rescue failed pipe resizes due to permissions
132
+
133
+ === unicorn 5.5.0 / 2019-03-04 00:41 UTC
134
+
135
+ Mostly identical to 5.5.0.pre1, which I didn't hear any feedback
136
+ from:
137
+
138
+ https://bogomips.org/unicorn-public/20181220222842.GA27382@dcvr/
139
+
140
+ > Jeremy Evans contributed the "default_middleware" configuration option:
141
+ >
142
+ > https://bogomips.org/unicorn-public/20180913192055.GD48926@jeremyevans.local/
143
+ >
144
+ > Jeremy also contributed the ability to use separate groups for the process
145
+ > and log files:
146
+ >
147
+ > https://bogomips.org/unicorn-public/20180913192449.GE48926@jeremyevans.local/
148
+ >
149
+ > There's also a couple of uninteresting minor optimizations and
150
+ > documentation additions.
151
+
152
+ Otherwise, there's one extra change to use
153
+ rb_gc_register_mark_object which is finally a documented part of
154
+ the Ruby C-API, but has existed since the 1.9 days.
155
+
156
+ === unicorn 5.5.0.pre1 / 2018-12-20 20:11 UTC
157
+
158
+ Jeremy Evans contributed the "default_middleware" configuration option:
159
+
160
+ https://bogomips.org/unicorn-public/20180913192055.GD48926@jeremyevans.local/
161
+
162
+ Jeremy also contributed the ability to use separate groups for the process
163
+ and log files:
164
+
165
+ https://bogomips.org/unicorn-public/20180913192449.GE48926@jeremyevans.local/
166
+
167
+ There's also a couple of uninteresting minor optimizations and
168
+ documentation additions.
169
+
170
+ Eric Wong (10):
171
+ remove random seed reset atfork
172
+ use IO#wait instead of kgio_wait_readable
173
+ Merge branch '5.4-stable'
174
+ shrink pipes under Linux
175
+ socket_helper: add hint for FreeBSD users for accf_http(9)
176
+ tests: ensure -N/--no-default-middleware not supported in config.ru
177
+ doc: update more URLs to use HTTPS and avoid redirects
178
+ deduplicate strings VM-wide in Ruby 2.5+
179
+ doc/ISSUES: add links to git clone-able mail archives of our dependencies
180
+ README: minor updates and additional disclaimer
181
+
182
+ Jeremy Evans (2):
183
+ Make Worker#user support different process primary group and log file group
184
+ Support default_middleware configuration option
185
+
186
+ === unicorn 5.4.1 / 2018-07-23 17:13 UTC
187
+
188
+ This release quiets some warnings for Ruby 2.6 preview releases
189
+ and enables tests to pass under Ruby 1.9.3. Otherwise, nothing
190
+ interesting for Ruby 2.0..2.5 users. *YAWN*
191
+
192
+ Eric Wong (1):
193
+ quiet some mismatched indentation warnings
194
+
195
+ Fumiaki MATSUSHIMA (1):
196
+ Use IO#wait instead to fix test for Ruby 1.9
197
+
198
+ === unicorn 5.4.0 / 2017-12-23 23:33 UTC
199
+
200
+ Rack hijack support improves as the app code can capture and use
201
+ the Rack `env' privately without copying it (to avoid clobbering
202
+ by another client). Thanks to Sam Saffron for reporting and
203
+ testing this new feature:
204
+ https://bogomips.org/unicorn-public/CAAtdryPG3nLuyo0jxfYW1YHu1Q+ZpkLkd4KdWC8vA46B5haZxw@mail.gmail.com/T/
205
+
206
+ We also now support $DEBUG being set by the Rack app (instead of
207
+ relying on the "-d" CLI switch). Thanks to James P Robinson Jr
208
+ for reporting this bug:
209
+ https://bogomips.org/unicorn-public/D6324CB4.7BC3E%25james.robinson3@cigna.com/T/
210
+ (Coincidentally, this fix will be irrelevant for Ruby 2.5
211
+ which requires 'pp' by default)
212
+
213
+ There's a few minor test cleanups and documentation updates, too.
214
+
215
+ All commits since v5.3.1 (2017-10-03):
216
+
217
+ reduce method calls with String#start_with?
218
+ require 'pp' if $DEBUG is set by Rack app
219
+ avoid reusing env on hijack
220
+ tests: cleanup some unused variable warnings
221
+ ISSUES: add a note about Debian BTS interopability
222
+
223
+ Roughly all mailing discussions since the last release:
224
+
225
+ https://bogomips.org/unicorn-public/?q=d:20171004..20171223
226
+
227
+ === unicorn 5.3.1 / 2017-10-03 19:03 UTC
228
+
229
+ This release fixes an occasional GC problem introduced in v5.3.0
230
+ to reduce global variable overhead (commit 979ebcf91705709b)
231
+
232
+ Thanks to Xuanzhong Wei for the patch which lead to this release:
233
+
234
+ https://bogomips.org/unicorn-public/20171003182054.76392-1-azrlew@gmail.com/T/#u
235
+ https://bogomips.org/unicorn-public/20171003145718.30404-1-azrlew@gmail.com/T/#u
236
+
237
+ Xuanzhong Wei (1):
238
+ fix GC issue on rb_global_variable array
239
+
240
+ === unicorn 5.3.0 / 2017-04-01 08:03 UTC
241
+
242
+ A couple of portability fixes from Dylan Thacker-Smith and
243
+ Jeremy Evans since 5.3.0.pre1 over a week ago, but this looks
244
+ ready for a stable release, today.
245
+
246
+ When I started this over 8 years ago, I wondered if this would
247
+ just end up being an April Fools' joke. Guess not. I guess I
248
+ somehow tricked people into using a terribly marketed web server
249
+ that cannot talk directly to untrusted clients :x Anyways,
250
+ unicorn won't be able to handle slow clients 8 years from now,
251
+ either, or 80 years from now. And I vow never to learn to use
252
+ new-fangled things like epoll, kqueue, or threads :P
253
+
254
+ Anyways, this is a largish release with several new features,
255
+ and no backwards incompatibilities.
256
+
257
+ Simon Eskildsen contributed heavily using TCP_INFO under Linux
258
+ to implement the (now 5 year old) check_client_connection feature:
259
+
260
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-check_client_connection
261
+ https://bogomips.org/unicorn-public/?q=s:check_client_connection&d:..20170401&x=t
262
+
263
+ This also led to FreeBSD and OpenBSD portability improvements in
264
+ one of our dependencies, raindrops:
265
+
266
+ https://bogomips.org/raindrops-public/20170323024829.GA5190@dcvr/T/#u
267
+
268
+ Jeremy Evans contributed several new features. First he
269
+ implemented after_worker_exit to aid debugging:
270
+
271
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-after_worker_exit
272
+ https://bogomips.org/unicorn-public/?q=s:after_worker_exit&d:..20170401&x=t#t
273
+
274
+ And then security-related features to isolate workers. Workers
275
+ may now chroot to drop access to the master filesystem, and the
276
+ new after_worker_ready configuration hook now exists to aid with
277
+ chroot support in workers:
278
+
279
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-after_worker_ready
280
+ https://bogomips.org/unicorn/Unicorn/Worker.html#method-i-user
281
+ https://bogomips.org/unicorn-public/?q=s:after_worker_ready&d:..20170401&x=t#t
282
+ https://bogomips.org/unicorn-public/?q=s:chroot&d:..20170401&x=t#t
283
+
284
+ Additionally, workers may run in a completely different VM space
285
+ (nullifying preload_app and any CoW savings) with the new
286
+ worker_exec option:
287
+
288
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-worker_exec
289
+ https://bogomips.org/unicorn-public/?q=s:worker_exec&d:..20170401&x=t#t
290
+
291
+ There are also several improvements to FreeBSD and OpenBSD
292
+ support with the addition of these features.
293
+
294
+ shortlog of changes since v5.2.0 (2016-10-31):
295
+
296
+ Dylan Thacker-Smith (1):
297
+ Check for Socket::TCP_INFO constant before trying to get TCP_INFO
298
+
299
+ Eric Wong (30):
300
+ drop rb_str_set_len compatibility replacement
301
+ TUNING: document THP caveat for Linux users
302
+ tee_input: simplify condition for IO#write
303
+ remove response_start_sent
304
+ http_request: freeze constant strings passed IO#write
305
+ Revert "remove response_start_sent"
306
+ t/t0012-reload-empty-config.sh: access ivars directly if needed
307
+ t0011-active-unix-socket.sh: fix race condition in test
308
+ new test for check_client_connection
309
+ revert signature change to HttpServer#process_client
310
+ support "struct tcp_info" on non-Linux and Ruby 2.2+
311
+ unicorn_http: reduce rb_global_variable calls
312
+ oob_gc: rely on opt_aref_with optimization on Ruby 2.2+
313
+ http_request: reduce insn size for check_client_connection
314
+ freebsd: avoid EINVAL when setting accept filter
315
+ test-lib: expr(1) portability fix
316
+ tests: keep disabled tests defined
317
+ test_exec: SO_KEEPALIVE value only needs to be true
318
+ doc: fix links to raindrops project
319
+ http_request: support proposed Raindrops::TCP states on non-Linux
320
+ ISSUES: expand on mail archive info + subscription disclaimer
321
+ test_ccc: use a pipe to synchronize test
322
+ doc: remove private email support address
323
+ input: update documentation and hide internals.
324
+ http_server: initialize @pid ivar
325
+ gemspec: remove olddoc from build dependency
326
+ doc: add version annotations for new features
327
+ unicorn 5.3.0.pre1
328
+ doc: note after_worker_exit is also 5.3.0+
329
+ test_exec: SO_KEEPALIVE value only needs to be true (take #2)
330
+
331
+ Jeremy Evans (7):
332
+ Add after_worker_exit configuration option
333
+ Fix code example in after_worker_exit documentation
334
+ Add support for chroot to Worker#user
335
+ Add after_worker_ready configuration option
336
+ Add worker_exec configuration option
337
+ Don't pass a block for fork when forking workers
338
+ Check for SocketError on first ccc attempt
339
+
340
+ Simon Eskildsen (1):
341
+ check_client_connection: use tcp state on linux
342
+
343
+ === unicorn 5.3.0.pre1 / 2017-03-24 00:25 UTC
344
+
345
+ A largish release with several new features.
346
+
347
+ Simon Eskildsen contributed heavily using TCP_INFO under Linux
348
+ to implement the (now 5 year old) check_client_connection feature:
349
+
350
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-check_client_connection
351
+ https://bogomips.org/unicorn-public/?q=s:check_client_connection&d:..20170324&x=t
352
+
353
+ This also led to FreeBSD and OpenBSD portability improvements in
354
+ one of our dependencies, raindrops:
355
+
356
+ https://bogomips.org/raindrops-public/20170323024829.GA5190@dcvr/T/#u
357
+
358
+ Jeremy Evans contributed several new features. First he
359
+ implemented after_worker_exit to aid debugging:
360
+
361
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-after_worker_exit
362
+ https://bogomips.org/unicorn-public/?q=s:after_worker_exit&d:..20170324&x=t#t
363
+
364
+ And then security-related features to isolate workers. Workers
365
+ may now chroot to drop access to the master filesystem, and the
366
+ new after_worker_ready configuration hook now exists to aid with
367
+ chroot support in workers:
368
+
369
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-after_worker_ready
370
+ https://bogomips.org/unicorn/Unicorn/Worker.html#method-i-user
371
+ https://bogomips.org/unicorn-public/?q=s:after_worker_ready&d:..20170324&x=t#t
372
+ https://bogomips.org/unicorn-public/?q=s:chroot&d:..20170324&x=t#t
373
+
374
+ Additionally, workers may run in a completely different VM space
375
+ (nullifying preload_app and any CoW savings) with the new
376
+ worker_exec option:
377
+
378
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-worker_exec
379
+ https://bogomips.org/unicorn-public/?q=s:worker_exec&d:..20170324&x=t#t
380
+
381
+ There are also several improvements to FreeBSD and OpenBSD
382
+ support with the addition of these features.
383
+
384
+ 34 changes since 5.2.0 (2016-10-31):
385
+
386
+ Eric Wong (27):
387
+ drop rb_str_set_len compatibility replacement
388
+ TUNING: document THP caveat for Linux users
389
+ tee_input: simplify condition for IO#write
390
+ remove response_start_sent
391
+ http_request: freeze constant strings passed IO#write
392
+ Revert "remove response_start_sent"
393
+ t/t0012-reload-empty-config.sh: access ivars directly if needed
394
+ t0011-active-unix-socket.sh: fix race condition in test
395
+ new test for check_client_connection
396
+ revert signature change to HttpServer#process_client
397
+ support "struct tcp_info" on non-Linux and Ruby 2.2+
398
+ unicorn_http: reduce rb_global_variable calls
399
+ oob_gc: rely on opt_aref_with optimization on Ruby 2.2+
400
+ http_request: reduce insn size for check_client_connection
401
+ freebsd: avoid EINVAL when setting accept filter
402
+ test-lib: expr(1) portability fix
403
+ tests: keep disabled tests defined
404
+ test_exec: SO_KEEPALIVE value only needs to be true
405
+ doc: fix links to raindrops project
406
+ http_request: support proposed Raindrops::TCP states on non-Linux
407
+ ISSUES: expand on mail archive info + subscription disclaimer
408
+ test_ccc: use a pipe to synchronize test
409
+ doc: remove private email support address
410
+ input: update documentation and hide internals.
411
+ http_server: initialize @pid ivar
412
+ gemspec: remove olddoc from build dependency
413
+ doc: add version annotations for new features
414
+
415
+ Jeremy Evans (6):
416
+ Add after_worker_exit configuration option
417
+ Fix code example in after_worker_exit documentation
418
+ Add support for chroot to Worker#user
419
+ Add after_worker_ready configuration option
420
+ Add worker_exec configuration option
421
+ Don't pass a block for fork when forking workers
422
+
423
+ Simon Eskildsen (1):
424
+ check_client_connection: use tcp state on linux
425
+
426
+ === unicorn 5.2.0 / 2016-10-31 20:00 UTC
427
+
428
+ Most notably, this release allows us to support requests with
429
+ lines delimited by LF-only, as opposed to the standard CRLF
430
+ pair and allowed by RFC 2616 sec 19.3.
431
+
432
+ Thanks to Mishael A Sibiryakov for the explanation and change:
433
+
434
+ https://bogomips.org/unicorn-public/1476954332.1736.156.camel@junki.org/
435
+
436
+ Thanks to Let's Encrypt, the website also moves to HTTPS
437
+ <https://bogomips.org/unicorn/> to improve reader privacy. The
438
+ "unicorn.bogomips.org" subdomain will be retired soon to reduce
439
+ subjectAltName bloat and speed up certificate renewals.
440
+
441
+ There's also the usual round of documentation and example
442
+ updates, too.
443
+
444
+ Eric Wong (7):
445
+ examples/init.sh: update to reduce upgrade raciness
446
+ doc: systemd should only kill master in example
447
+ examples/logrotate.conf: update example for systemd
448
+ doc: update gmane URLs to point to our own archives
449
+ relocate website to https://bogomips.org/unicorn/
450
+ TODO: remove Rack 2.x item
451
+ build: "install-gem" target avoids network
452
+
453
+ Mishael A Sibiryakov (1):
454
+ Add some tolerance (RFC2616 sec. 19.3)
455
+
456
+ === unicorn 5.1.0 - rack is optional, again / 2016-04-01 00:35 UTC
457
+
458
+ Note: no code changes since 5.1.0.pre1 from January.^WNo, wait,
459
+ last minute performance improvement added today. See below.
460
+
461
+ The big change is rack is not required (but still recommended).
462
+ Applications are expected to depend on rack on their own so they can
463
+ specify the version of rack they prefer without unicorn pulling
464
+ in a newer, potentially incompatible version.
465
+
466
+ unicorn will always attempt to work with multiple versions of rack
467
+ as practical.
468
+
469
+ The HTTP parser also switched to using the TypedData C-API for
470
+ extra type safety and memory usage accounting support in the
471
+ 'objspace' extension.
472
+
473
+ Thanks to Adam Duke to bringing the rack change to our attention
474
+ and Aaron Patterson for helping with the matter.
475
+
476
+ Last minute change: we now support the new leftpad() syscall under
477
+ Linux for major performance and security improvement:
478
+
479
+ http://mid.gmane.org/1459463613-32473-1-git-send-email-richard@nod.at
480
+
481
+ 8^H9 changes since 5.0.1:
482
+
483
+ http: TypedData C-API conversion
484
+ various documentation updates
485
+ doc: bump olddoc to ~> 1.2 for extra NNTP URL
486
+ rack is optional at runtime, required for dev
487
+ doc update for ClientShutdown exceptions class
488
+ unicorn 5.1.0.pre1 - rack is optional, again
489
+ doc: reference --keep-file-descriptors for "bundle exec"
490
+ doc: further trimming to reduce noise
491
+ use leftpad Linux syscall for speed!
492
+
493
+ === unicorn 5.1.0.pre1 - rack is optional, again / 2016-01-27 23:08 UTC
494
+
495
+ The big change is rack is not required (but still recommended).
496
+ Applications are expected to depend on rack on their own so they can
497
+ specify the version of rack they prefer without unicorn pulling
498
+ in a newer, potentially incompatible version.
499
+
500
+ unicorn will always attempt to work with multiple versions of rack
501
+ as practical.
502
+
503
+ The HTTP parser also switched to using the TypedData C-API for
504
+ extra type safety and memory usage accounting support in the
505
+ 'objspace' extension.
506
+
507
+ Thanks to Adam Duke to bringing the rack change to our attention
508
+ and Aaron Patterson for helping with the matter.
509
+
510
+ There might be more documentation-related changes before 5.1.0
511
+ final. I am considering dropping pandoc from manpage generation
512
+ and relying on pod2man (from Perl) because it has a wider install
513
+ base.
514
+
515
+ 5 changes since v5.0.1:
516
+
517
+ http: TypedData C-API conversion
518
+ various documentation updates
519
+ doc: bump olddoc to ~> 1.2 for extra NNTP URL
520
+ rack is optional at runtime, required for dev
521
+ doc update for ClientShutdown exceptions class
522
+
523
+ === unicorn 5.0.1 - continuing to violate Rack SPEC / 2015-11-17 22:44 UTC
524
+
525
+ Once again, we allow nil values in response headers. We've had
526
+ this bug since March 2009, and thus cannot expect existing
527
+ applications and middlewares running unicorn to fix this.
528
+
529
+ Unfortunately, supporting this bug contributes to application
530
+ server lock-in, but at least we'll document it as such.
531
+
532
+ Thanks to Owen Ou <o@heroku.com> for reporting this regression:
533
+
534
+ http://bogomips.org/unicorn-public/CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com/
535
+
536
+ Additionally, systemd examples are now in the examples/ directory
537
+ based on a post by Christos Trochalakis <yatiohi@ideopolis.gr>:
538
+
539
+ http://bogomips.org/unicorn-public/20150708130821.GA1361@luke.ws.skroutz.gr/
540
+
541
+ === unicorn 5.0.0 - most boring major release. EVER. / 2015-11-01 08:48 UTC
542
+
543
+ An evolutionary dead-end since its announcement[1] nearly six years
544
+ ago, this old-fashioned preforker has had enough bugs and missteps
545
+ that it's managed to hit version 5!
546
+
547
+ I wish I could say unicorn 5 is leaps and bounds better than 4, but
548
+ it is not. This major version change allows us to drop some cruft
549
+ and unused features which accumulated over the years, resulting in
550
+ several kilobytes of memory saved[2]!
551
+
552
+ Compatibility:
553
+
554
+ * The horrible, proprietary (:P) "Status:" response header is
555
+ finally gone, saving at least 16 precious bytes in every HTTP
556
+ response. This should make it easier to write custom HTTP clients
557
+ which are compatible across all HTTP servers. It will hopefully
558
+ make migrating between different Rack servers easier for new
559
+ projects.
560
+
561
+ * Ruby 1.8 support removed. Ruby 1.9.3 is currently the earliest
562
+ supported version. However, expect minor, likely-unnoticeable
563
+ performance regressions if you use Ruby 2.1 or earlier. Going
564
+ forward, unicorn will favor the latest version (currently 2.2) of
565
+ the mainline Ruby implementation, potentially sacrificing
566
+ performance on older Rubies.
567
+
568
+ * Some internal, undocumented features and APIs used by
569
+ derivative servers are gone; removing bloat and slightly lowering
570
+ memory use. We have never and will never endorse the use of any
571
+ applications or middleware with a dependency on unicorn,
572
+ applications should be written for Rack instead.
573
+ Note: Rainbows! 5.0 will be released next week or so to be
574
+ compatible with unicorn 5.x
575
+
576
+ New features:
577
+
578
+ * sd_listen_fds(3) emulation added for systemd compatibility.
579
+ You may now stop using PID files and other process monitoring
580
+ software when using systemd.
581
+
582
+ * Newly-set TCP socket options are now applied to inherited sockets.
583
+
584
+ * Dynamic changes in the application to Rack::Utils::HTTP_STATUS
585
+ hash is now supported; allowing users to set custom status lines
586
+ in Rack to be reflected in unicorn. This feature causes a minor
587
+ performance regression, but is made up for Ruby 2.2 users with
588
+ other optimizations.
589
+
590
+ * The monotonic clock is used under Ruby 2.1+, making the
591
+ timeout feature immune to system clock changes.
592
+
593
+ As unicorn may be used anonymously without registration, the
594
+ project is committed to supporting anonymous and pseudonymous
595
+ help requests, contributions and feedback via plain-text mail to:
596
+
597
+ unicorn-public@bogomips.org
598
+
599
+ The mail submission port (587) is open to those behind firewalls
600
+ and allows access via Tor and anonymous remailers.
601
+ Archives are accessible via: http://bogomips.org/unicorn-public/
602
+ and mirrored to various other places, so you do not need to use
603
+ a valid address when posting.
604
+
605
+ Finally, rest assured the core design of unicorn will never change.
606
+ It will never use new-fangled things like threads, kqueue or epoll;
607
+ but will always remain a preforking server serving one client
608
+ per-process.
609
+
610
+ [1] http://mid.gmane.org/20090211230457.GB22926@dcvr.yhbt.net
611
+ [2] this would've been like, totally gnarly in the 80s!
612
+
613
+ === unicorn 5.0.0.pre2 - another prerelease! / 2015-07-06 21:37 UTC
614
+
615
+ There is a minor TCP socket options are now applied to inherited
616
+ sockets, and we have native support for inheriting sockets from
617
+ systemd (by emulating the sd_listen_fds(3) function).
618
+
619
+ Dynamic changes in the application to Rack::Utils::HTTP_STATUS
620
+ codes is now supported, so you can use your own custom status
621
+ lines.
622
+
623
+ Ruby 2.2 and later is now favored for performance.
624
+ Optimizations by using constants which made sense in earlier
625
+ versions of Ruby are gone: so users of old Ruby versions
626
+ will see performance regressions. Ruby 2.2 users should
627
+ see the same or better performance, and we have less code
628
+ as a result.
629
+
630
+ * doc: update some invalid URLs
631
+ * apply TCP socket options on inherited sockets
632
+ * reflect changes in Rack::Utils::HTTP_STATUS_CODES
633
+ * reduce constants and optimize for Ruby 2.2
634
+ * http_response: reduce size of multi-line header path
635
+ * emulate sd_listen_fds for systemd support
636
+ * test/unit/test_response.rb: compatibility with older test-unit
637
+
638
+ This also includes all changes in unicorn 5.0.0.pre1:
639
+
640
+ http://bogomips.org/unicorn-public/m/20150615225652.GA16164@dcvr.yhbt.net.html
641
+
642
+ === unicorn 5.0.0.pre1 - incompatible changes! / 2015-06-15 22:49 UTC
643
+
644
+ This release finally drops Ruby 1.8 support and requires Ruby 1.9.3
645
+ or later. The horrible "Status:" header in our HTTP response is
646
+ finally gone, saving at least 16 precious bytes in every single HTTP
647
+ response.
648
+
649
+ Under Ruby 2.1 and later, the monotonic clock is used for timeout
650
+ handling for better accuracy.
651
+
652
+ Several experimental, unused and undocumented features are removed.
653
+
654
+ There's also tiny, minor performance and memory improvements from
655
+ dropping 1.8 compatibility, but probably nothing noticeable on a
656
+ typical real-life (bloated) app.
657
+
658
+ The biggest performance improvement we made was to our website by
659
+ switching to olddoc. Depending on connection speed, latency, and
660
+ renderer performance, it typically loads two to four times faster.
661
+
662
+ Finally, for the billionth time: unicorn must never be exposed
663
+ to slow clients, as it will never ever use new-fangled things
664
+ like non-blocking socket I/O, threads, epoll or kqueue. unicorn
665
+ must be used with a fully-buffering reverse proxy such as nginx
666
+ for slow clients.
667
+
668
+ * ISSUES: update with mailing list subscription
669
+ * GIT-VERSION-GEN: start 5.0.0 development
670
+ * http: remove xftrust options
671
+ * FAQ: add entry for Rails autoflush_log
672
+ * dev: remove isolate dependency
673
+ * unicorn.gemspec: depend on test-unit 3.0
674
+ * http_response: remove Status: header
675
+ * remove RubyForge and Freecode references
676
+ * remove mongrel.rubyforge.org references
677
+ * http: remove the keepalive requests limit
678
+ * http: reduce parser from 72 to 56 bytes on 64-bit
679
+ * examples: add run_once to before_fork hook example
680
+ * worker: remove old tmp accessor
681
+ * http_server: save 450+ bytes of memory on x86-64
682
+ * t/t0002-parser-error.sh: relax test for rack 1.6.0
683
+ * remove SSL support
684
+ * tmpio: drop the "size" method
685
+ * switch docs + website to olddoc
686
+ * README: clarify/reduce references to unicorn_rails
687
+ * gemspec: fixup olddoc migration
688
+ * use the monotonic clock under Ruby 2.1+
689
+ * http: -Wshorten-64-to-32 warnings on clang
690
+ * remove old inetd+git examples and exec_cgi
691
+ * http: standalone require + reduction in binary size
692
+ * GNUmakefile: fix clean gem build + reduce build cruft
693
+ * socket_helper: reduce constant lookups and caching
694
+ * remove 1.8, <= 1.9.1 fallback for missing IO#autoclose=
695
+ * favor IO#close_on_exec= over fcntl in 1.9+
696
+ * use require_relative to reduce syscalls at startup
697
+ * doc: update support status for Ruby versions
698
+ * fix uninstalled testing and reduce require paths
699
+ * test_socket_helper: do not depend on SO_REUSEPORT
700
+ * favor "a.b(&:c)" form over "a.b { |x| x.c }"
701
+ * ISSUES: add section for bugs in other projects
702
+ * http_server: favor ivars over constants
703
+ * explain 11 byte magic number for self-pipe
704
+ * const: drop constants used by Rainbows!
705
+ * reduce and localize constant string use
706
+ * Links: mark Rainbows! as historical, reference yahns
707
+ * save about 200 bytes of memory on x86-64
708
+ * http: remove deprecated reset method
709
+ * http: remove experimental dechunk! method
710
+ * socket_helper: update comments
711
+ * doc: document UNICORN_FD in manpage
712
+ * doc: document Etc.nprocessors for worker_processes
713
+ * favor more string literals for cold call sites
714
+ * tee_input: support for Rack::TempfileReaper middleware
715
+ * support TempfileReaper in deployment and development envs
716
+ * favor kgio_wait_readable for single FD over select
717
+ * Merge tag 'v4.9.0'
718
+ * http_request: support rack.hijack by default
719
+ * avoid extra allocation for hijack proc creation
720
+ * FAQ: add note about ECONNRESET errors from bodies
721
+ * process SIGWINCH unless stdin is a TTY
722
+ * ISSUES: discourage HTML mail strongly, welcome nyms
723
+ * http: use rb_hash_clear in Ruby 2.0+
724
+ * http_response: avoid special-casing for Rack < 1.5
725
+ * www: install NEWS.atom.xml properly
726
+ * http_server: remove a few more accessors and constants
727
+ * http_response: simplify regular expression
728
+ * move the socket into Rack env for hijacking
729
+ * http: move response_start_sent into the C ext
730
+ * FAQ: reorder bit on Rack 1.1.x and Rails 2.3.x
731
+ * ensure body is closed during hijack
732
+
733
+ === unicorn 4.9.0 - TempfileReaper support in Rack 1.6 / 2015-04-24 03:09 UTC
734
+
735
+ This release supports the Rack::TempfileReaper middleware found
736
+ in rack 1.6 for cleaning up disk space used by temporary files.
737
+ We also use Rack::TempfileReaper for cleaning up large temporary
738
+ files buffered with TeeInput. Users on rack 1.5 and earlier
739
+ will see no changes.
740
+
741
+ There's also a bunch of documentation/build system improvements.
742
+
743
+ This is likely to be the last Ruby 1.8-compatible release,
744
+ unicorn 5.x will require 1.9.3 or later as well as dropping lots
745
+ of cruft (the stupid "Status:" header in responses being the
746
+ most notable).
747
+
748
+ 21 changes backported from master:
749
+
750
+ ISSUES: update with mailing list subscription
751
+ FAQ: add entry for Rails autoflush_log
752
+ dev: remove isolate dependency
753
+ unicorn.gemspec: depend on test-unit 3.0
754
+ remove RubyForge and Freecode references
755
+ remove mongrel.rubyforge.org references
756
+ examples: add run_once to before_fork hook example
757
+ t/t0002-parser-error.sh: relax test for rack 1.6.0
758
+ switch docs + website to olddoc
759
+ README: clarify/reduce references to unicorn_rails
760
+ gemspec: fixup olddoc migration
761
+ GNUmakefile: fix clean gem build + reduce build cruft
762
+ doc: update support status for Ruby versions
763
+ fix uninstalled testing and reduce require paths
764
+ test_socket_helper: do not depend on SO_REUSEPORT
765
+ ISSUES: add section for bugs in other projects
766
+ explain 11 byte magic number for self-pipe
767
+ Links: mark Rainbows! as historical, reference yahns
768
+ doc: document UNICORN_FD in manpage
769
+ tee_input: support for Rack::TempfileReaper middleware
770
+ support TempfileReaper in deployment and development envs
771
+
1
772
  === unicorn 4.8.3 - the end of an era / 2014-05-07 07:50 UTC
2
773
 
3
774
  This release updates documentation to reflect the migration of the