unicorn 5.0.1 → 5.3.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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/.manifest +1 -0
  3. data/.olddoc.yml +6 -4
  4. data/Documentation/unicorn.1.txt +2 -3
  5. data/Documentation/unicorn_rails.1.txt +3 -3
  6. data/FAQ +1 -1
  7. data/GIT-VERSION-FILE +1 -1
  8. data/GIT-VERSION-GEN +1 -1
  9. data/GNUmakefile +3 -3
  10. data/HACKING +1 -2
  11. data/ISSUES +21 -17
  12. data/KNOWN_ISSUES +2 -2
  13. data/LATEST +102 -28
  14. data/Links +3 -3
  15. data/NEWS +373 -0
  16. data/README +7 -19
  17. data/SIGNALS +1 -1
  18. data/Sandbox +6 -5
  19. data/TODO +0 -2
  20. data/TUNING +19 -1
  21. data/examples/big_app_gc.rb +1 -1
  22. data/examples/init.sh +36 -8
  23. data/examples/logrotate.conf +16 -1
  24. data/examples/nginx.conf +1 -1
  25. data/examples/unicorn.conf.minimal.rb +2 -2
  26. data/examples/unicorn.conf.rb +2 -2
  27. data/examples/unicorn@.service +7 -0
  28. data/ext/unicorn_http/common_field_optimization.h +2 -2
  29. data/ext/unicorn_http/ext_help.h +0 -20
  30. data/ext/unicorn_http/extconf.rb +1 -1
  31. data/ext/unicorn_http/global_variables.h +2 -2
  32. data/ext/unicorn_http/httpdate.c +2 -2
  33. data/ext/unicorn_http/unicorn_http.c +673 -358
  34. data/ext/unicorn_http/unicorn_http.rl +32 -16
  35. data/ext/unicorn_http/unicorn_http_common.rl +1 -1
  36. data/lib/unicorn/configurator.rb +71 -12
  37. data/lib/unicorn/http_request.rb +89 -9
  38. data/lib/unicorn/http_response.rb +5 -2
  39. data/lib/unicorn/http_server.rb +66 -22
  40. data/lib/unicorn/oob_gc.rb +4 -4
  41. data/lib/unicorn/socket_helper.rb +19 -4
  42. data/lib/unicorn/stream_input.rb +5 -4
  43. data/lib/unicorn/tee_input.rb +8 -10
  44. data/lib/unicorn/version.rb +1 -1
  45. data/lib/unicorn/worker.rb +17 -6
  46. data/lib/unicorn.rb +31 -20
  47. data/man/man1/unicorn.1 +54 -55
  48. data/man/man1/unicorn_rails.1 +47 -46
  49. data/t/t0011-active-unix-socket.sh +1 -1
  50. data/t/t0012-reload-empty-config.sh +2 -1
  51. data/t/test-lib.sh +2 -2
  52. data/test/exec/test_exec.rb +6 -5
  53. data/test/unit/test_ccc.rb +90 -0
  54. data/test/unit/test_http_parser.rb +31 -17
  55. data/test/unit/test_socket_helper.rb +8 -4
  56. data/test/unit/test_util.rb +2 -2
  57. data/unicorn.gemspec +15 -17
  58. metadata +6 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 277fcaa980e2e0c38def0c8d5d2a62de55ad659d
4
- data.tar.gz: 315f01cb5df3ab7c606cc7071f457431161a34fb
3
+ metadata.gz: cae827cc4674fdbfd9291caf3037f0fe4a5e67b7
4
+ data.tar.gz: e6518f02407def59575f3efb01a54019e0fdcab9
5
5
  SHA512:
6
- metadata.gz: 81284810b2b5fa7575737c865ced8e90491a22e24db092a15f381da8a802608e12c5c9a7beea5d99603cd2c167fb5ea5d937708b26c1e28f66ee80980a06b7ae
7
- data.tar.gz: 4ca0c767edc69c6e93b5b58329266ac81234ff1da9b4640a1c19bc97f3a3e9d8911727205e47a4ad1a89c328042096bd213a85a367717687e9adc715f635810b
6
+ metadata.gz: 2a9bd5f4dacb2aa56002b9899d1725bdfc124def5b9287ff464b3ed0e47785db1aa14b52757173d990972ad5a3a4afc44e37f052f7ef8ac92ae7fac0daa3645d
7
+ data.tar.gz: da9be558581cb34ee8b8c81bdcfcd659dc5e26d0cc42aa291ced5749ea07cbfe14fdce7a2fbfd43339990331e9c58e346d0129ea035c817ff59c8825d34f5645
data/.manifest CHANGED
@@ -140,6 +140,7 @@ test/benchmark/stack.ru
140
140
  test/exec/README
141
141
  test/exec/test_exec.rb
142
142
  test/test_helper.rb
143
+ test/unit/test_ccc.rb
143
144
  test/unit/test_configurator.rb
144
145
  test/unit/test_droplet.rb
145
146
  test/unit/test_http_parser.rb
data/.olddoc.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  ---
2
- cgit_url: http://bogomips.org/unicorn.git
2
+ cgit_url: https://bogomips.org/unicorn.git
3
3
  git_url: git://bogomips.org/unicorn.git
4
- rdoc_url: http://unicorn.bogomips.org/
5
- ml_url: http://bogomips.org/unicorn-public/
4
+ rdoc_url: https://bogomips.org/unicorn/
5
+ ml_url: https://bogomips.org/unicorn-public/
6
6
  merge_html:
7
7
  unicorn_1: Documentation/unicorn.1.html
8
8
  unicorn_rails_1: Documentation/unicorn_rails.1.html
@@ -12,4 +12,6 @@ noindex:
12
12
  - TODO
13
13
  - unicorn_rails_1
14
14
  public_email: unicorn-public@bogomips.org
15
- private_email: unicorn@bogomips.org
15
+ nntp_url:
16
+ - nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
17
+ - nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
@@ -175,14 +175,13 @@ the unicorn config file.
175
175
 
176
176
  # SEE ALSO
177
177
 
178
- * unicorn_rails(1)
179
178
  * *Rack::Builder* ri/RDoc
180
179
  * *Unicorn::Configurator* ri/RDoc
181
180
  * [Unicorn RDoc][1]
182
181
  * [Rack RDoc][2]
183
182
  * [Rackup HowTo][3]
184
183
 
185
- [1]: http://unicorn.bogomips.org/
184
+ [1]: https://bogomips.org/unicorn/
186
185
  [2]: http://www.rubydoc.info/github/rack/rack/
187
186
  [3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
188
- [4]: http://unicorn.bogomips.org/SIGNALS.html
187
+ [4]: https://bogomips.org/unicorn/SIGNALS.html
@@ -4,7 +4,7 @@
4
4
 
5
5
  # NAME
6
6
 
7
- unicorn_rails - a script/server-like command to launch the Unicorn HTTP server
7
+ unicorn_rails - unicorn launcher for Rails 1.x and 2.x users
8
8
 
9
9
  # SYNOPSIS
10
10
 
@@ -169,7 +169,7 @@ used by Unicorn.
169
169
  * [Rack RDoc][2]
170
170
  * [Rackup HowTo][3]
171
171
 
172
- [1]: http://unicorn.bogomips.org/
172
+ [1]: https://bogomips.org/unicorn/
173
173
  [2]: http://www.rubydoc.info/github/rack/rack/
174
174
  [3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
175
- [4]: http://unicorn.bogomips.org/SIGNALS.html
175
+ [4]: https://bogomips.org/unicorn/SIGNALS.html
data/FAQ CHANGED
@@ -7,7 +7,7 @@ drained entirely by the application. This may happen when request
7
7
  bodies are gzipped, as unicorn reads request body data lazily to avoid
8
8
  overhead from bad requests.
9
9
 
10
- Ref: http://mid.gmane.org/FC91211E-FD32-432C-92FC-0318714C2170@zendesk.com
10
+ Ref: https://bogomips.org/unicorn-public/FC91211E-FD32-432C-92FC-0318714C2170@zendesk.com/
11
11
 
12
12
  === Why aren't my Rails log files rotated when I use SIGUSR1?
13
13
 
data/GIT-VERSION-FILE CHANGED
@@ -1 +1 @@
1
- GIT_VERSION = 5.0.1
1
+ GIT_VERSION = 5.3.1
data/GIT-VERSION-GEN CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- DEF_VER = "v5.0.1"
2
+ DEF_VER = "v5.3.1"
3
3
  CONSTANT = "Unicorn::Const::UNICORN_VERSION"
4
4
  RVF = "lib/unicorn/version.rb"
5
5
  GVF = "GIT-VERSION-FILE"
data/GNUmakefile CHANGED
@@ -183,13 +183,13 @@ doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS)
183
183
  install -m644 $(man1_paths) doc/
184
184
  tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
185
185
 
186
- # publishes docs to http://unicorn.bogomips.org
186
+ # publishes docs to https://bogomips.org/unicorn/
187
187
  publish_doc:
188
188
  -git set-file-times
189
189
  $(MAKE) doc
190
190
  $(MAKE) doc_gz
191
191
  chmod 644 $$(find doc -type f)
192
- $(RSYNC) -av doc/ unicorn.bogomips.org:/srv/unicorn/
192
+ $(RSYNC) -av doc/ bogomips.org:/srv/bogomips/unicorn/
193
193
  git ls-files | xargs touch
194
194
 
195
195
  # Create gzip variants of the same timestamp as the original so nginx
@@ -219,7 +219,7 @@ fix-perms:
219
219
  gem: $(pkggem)
220
220
 
221
221
  install-gem: $(pkggem)
222
- gem install $(CURDIR)/$<
222
+ gem install --local $(CURDIR)/$<
223
223
 
224
224
  $(pkggem): .manifest fix-perms
225
225
  gem build $(rfpackage).gemspec
data/HACKING CHANGED
@@ -57,7 +57,7 @@ Please wrap documentation at 72 characters-per-line or less (long URLs
57
57
  are exempt) so it is comfortably readable from terminals.
58
58
 
59
59
  When referencing mailing list posts, use
60
- "http://bogomips.org/unicorn-public/m/$MESSAGE_ID.html" if possible
60
+ <tt>https://bogomips.org/unicorn-public/$MESSAGE_ID/</tt> if possible
61
61
  since the Message-ID remains searchable even if a particular site
62
62
  becomes unavailable.
63
63
 
@@ -104,7 +104,6 @@ don't email the git mailing list or maintainer with Unicorn patches :)
104
104
 
105
105
  In order to build the gem, you must install the following components:
106
106
 
107
- * olddoc (RubyGem)
108
107
  * pandoc
109
108
 
110
109
  You can build the Unicorn gem with the following command:
data/ISSUES CHANGED
@@ -2,21 +2,23 @@
2
2
 
3
3
  mailto:unicorn-public@bogomips.org is the best place to report bugs,
4
4
  submit patches and/or obtain support after you have searched the
5
- {email archives}[http://bogomips.org/unicorn-public/] and
6
- {documentation}[http://unicorn.bogomips.org/].
5
+ {email archives}[https://bogomips.org/unicorn-public/] and
6
+ {documentation}[https://bogomips.org/unicorn/].
7
7
 
8
- * No subscription will ever be required to email the public inbox.
8
+ * No subscription will ever be required to email us
9
9
  * Cc: all participants in a thread or commit, as subscription is optional
10
10
  * Do not {top post}[http://catb.org/jargon/html/T/top-post.html] in replies
11
11
  * Quote as little as possible of the message you're replying to
12
- * Do not send HTML mail or images, it will be flagged as spam
13
- * Anonymous and pseudonymous messages will always be welcome.
12
+ * Do not send HTML mail or images,
13
+ they hurt reader privacy and will be flagged as spam
14
+ * Anonymous and pseudonymous messages will ALWAYS be welcome
14
15
  * The email submission port (587) is enabled on the bogomips.org MX:
15
- http://bogomips.org/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
16
+ https://bogomips.org/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
16
17
 
17
18
  If your issue is of a sensitive nature or you're just shy in public,
18
- then feel free to email us privately at mailto:unicorn@bogomips.org
19
- instead and your issue will be handled discreetly.
19
+ use anonymity tools such as Tor or Mixmaster; and rely on the public
20
+ mail archives for responses. Be sure to scrub sensitive log messages
21
+ and such.
20
22
 
21
23
  If you don't get a response within a few days, we may have forgotten
22
24
  about it so feel free to ask again.
@@ -64,29 +66,31 @@ document distributed with git) on guidelines for patch submission.
64
66
  == Contact Info
65
67
 
66
68
  * public: mailto:unicorn-public@bogomips.org
67
- * private: mailto:unicorn@bogomips.org
68
69
  * nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
69
70
  * nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
70
- * http://bogomips.org/unicorn-public/
71
+ * https://bogomips.org/unicorn-public/
72
+ * http://ou63pmih66umazou.onion/unicorn-public/
71
73
 
72
- We operate a {public-inbox}[http://public-inbox.org/] which
73
- feeds the mailing list. Subscription is optional, so Cc:
74
- all participants.
74
+ Mailing list subscription is optional, so Cc: all participants.
75
75
 
76
- You can follow along via NNTP:
76
+ You can follow along via NNTP (read-only):
77
77
 
78
78
  nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
79
79
  nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
80
80
 
81
81
  Or Atom feeds:
82
82
 
83
- http://bogomips.org/unicorn-public/new.atom
83
+ https://bogomips.org/unicorn-public/new.atom
84
+ http://ou63pmih66umazou.onion/unicorn-public/new.atom
84
85
 
85
- The HTML archives at http://bogomips.org/unicorn-public/
86
+ The HTML archives at https://bogomips.org/unicorn-public/
86
87
  also has links to per-thread Atom feeds and downloadable
87
88
  mboxes.
88
89
 
89
- You may also subscribe via plain-text email:
90
+ You may optionally subscribe via plain-text email:
90
91
 
91
92
  mailto:unicorn-public+subscribe@bogomips.org
92
93
  (and confirming the auto-reply)
94
+
95
+ Just keep in mind we suck at delivering email, so using NNTP,
96
+ or Atom feeds might be a better bet...
data/KNOWN_ISSUES CHANGED
@@ -9,7 +9,7 @@ acceptable solution. Those issues are documented here.
9
9
  handlers.
10
10
 
11
11
  * Issues with FreeBSD jails can be worked around as documented by Tatsuya Ono:
12
- http://mid.gmane.org/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com
12
+ https://bogomips.org/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/
13
13
 
14
14
  * PRNGs (pseudo-random number generators) loaded before forking
15
15
  (e.g. "preload_app true") may need to have their internal state
@@ -60,7 +60,7 @@ acceptable solution. Those issues are documented here.
60
60
  application to use Rails 2.3.2 and you have no other choice, then
61
61
  you may edit your unicorn gemspec and remove the Rack dependency.
62
62
 
63
- ref: http://mid.gmane.org/20091014221552.GA30624@dcvr.yhbt.net
63
+ ref: https://bogomips.org/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/
64
64
  Note: the workaround described in the article above only made
65
65
  the issue more subtle and we didn't notice them immediately.
66
66
 
data/LATEST CHANGED
@@ -1,29 +1,103 @@
1
- === unicorn 5.0.0.pre2 - another prerelease! / 2015-07-06 21:37 UTC
2
-
3
- There is a minor TCP socket options are now applied to inherited
4
- sockets, and we have native support for inheriting sockets from
5
- systemd (by emulating the sd_listen_fds(3) function).
6
-
7
- Dynamic changes in the application to Rack::Utils::HTTP_STATUS
8
- codes is now supported, so you can use your own custom status
9
- lines.
10
-
11
- Ruby 2.2 and later is now favored for performance.
12
- Optimizations by using constants which made sense in earlier
13
- versions of Ruby are gone: so users of old Ruby versions
14
- will see performance regressions. Ruby 2.2 users should
15
- see the same or better performance, and we have less code
16
- as a result.
17
-
18
- * doc: update some invalid URLs
19
- * apply TCP socket options on inherited sockets
20
- * reflect changes in Rack::Utils::HTTP_STATUS_CODES
21
- * reduce constants and optimize for Ruby 2.2
22
- * http_response: reduce size of multi-line header path
23
- * emulate sd_listen_fds for systemd support
24
- * test/unit/test_response.rb: compatibility with older test-unit
25
-
26
- This also includes all changes in unicorn 5.0.0.pre1:
27
-
28
- http://bogomips.org/unicorn-public/m/20150615225652.GA16164@dcvr.yhbt.net.html
1
+ === unicorn 5.3.0 / 2017-04-01 08:03 UTC
2
+
3
+ A couple of portability fixes from Dylan Thacker-Smith and
4
+ Jeremy Evans since 5.3.0.pre1 over a week ago, but this looks
5
+ ready for a stable release, today.
6
+
7
+ When I started this over 8 years ago, I wondered if this would
8
+ just end up being an April Fools' joke. Guess not. I guess I
9
+ somehow tricked people into using a terribly marketed web server
10
+ that cannot talk directly to untrusted clients :x Anyways,
11
+ unicorn won't be able to handle slow clients 8 years from now,
12
+ either, or 80 years from now. And I vow never to learn to use
13
+ new-fangled things like epoll, kqueue, or threads :P
14
+
15
+ Anyways, this is a largish release with several new features,
16
+ and no backwards incompatibilities.
17
+
18
+ Simon Eskildsen contributed heavily using TCP_INFO under Linux
19
+ to implement the (now 5 year old) check_client_connection feature:
20
+
21
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-check_client_connection
22
+ https://bogomips.org/unicorn-public/?q=s:check_client_connection&d:..20170401&x=t
23
+
24
+ This also led to FreeBSD and OpenBSD portability improvements in
25
+ one of our dependencies, raindrops:
26
+
27
+ https://bogomips.org/raindrops-public/20170323024829.GA5190@dcvr/T/#u
28
+
29
+ Jeremy Evans contributed several new features. First he
30
+ implemented after_worker_exit to aid debugging:
31
+
32
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-after_worker_exit
33
+ https://bogomips.org/unicorn-public/?q=s:after_worker_exit&d:..20170401&x=t#t
34
+
35
+ And then security-related features to isolate workers. Workers
36
+ may now chroot to drop access to the master filesystem, and the
37
+ new after_worker_ready configuration hook now exists to aid with
38
+ chroot support in workers:
39
+
40
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-after_worker_ready
41
+ https://bogomips.org/unicorn/Unicorn/Worker.html#method-i-user
42
+ https://bogomips.org/unicorn-public/?q=s:after_worker_ready&d:..20170401&x=t#t
43
+ https://bogomips.org/unicorn-public/?q=s:chroot&d:..20170401&x=t#t
44
+
45
+ Additionally, workers may run in a completely different VM space
46
+ (nullifying preload_app and any CoW savings) with the new
47
+ worker_exec option:
48
+
49
+ https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-worker_exec
50
+ https://bogomips.org/unicorn-public/?q=s:worker_exec&d:..20170401&x=t#t
51
+
52
+ There are also several improvements to FreeBSD and OpenBSD
53
+ support with the addition of these features.
54
+
55
+ shortlog of changes since v5.2.0 (2016-10-31):
56
+
57
+ Dylan Thacker-Smith (1):
58
+ Check for Socket::TCP_INFO constant before trying to get TCP_INFO
59
+
60
+ Eric Wong (30):
61
+ drop rb_str_set_len compatibility replacement
62
+ TUNING: document THP caveat for Linux users
63
+ tee_input: simplify condition for IO#write
64
+ remove response_start_sent
65
+ http_request: freeze constant strings passed IO#write
66
+ Revert "remove response_start_sent"
67
+ t/t0012-reload-empty-config.sh: access ivars directly if needed
68
+ t0011-active-unix-socket.sh: fix race condition in test
69
+ new test for check_client_connection
70
+ revert signature change to HttpServer#process_client
71
+ support "struct tcp_info" on non-Linux and Ruby 2.2+
72
+ unicorn_http: reduce rb_global_variable calls
73
+ oob_gc: rely on opt_aref_with optimization on Ruby 2.2+
74
+ http_request: reduce insn size for check_client_connection
75
+ freebsd: avoid EINVAL when setting accept filter
76
+ test-lib: expr(1) portability fix
77
+ tests: keep disabled tests defined
78
+ test_exec: SO_KEEPALIVE value only needs to be true
79
+ doc: fix links to raindrops project
80
+ http_request: support proposed Raindrops::TCP states on non-Linux
81
+ ISSUES: expand on mail archive info + subscription disclaimer
82
+ test_ccc: use a pipe to synchronize test
83
+ doc: remove private email support address
84
+ input: update documentation and hide internals.
85
+ http_server: initialize @pid ivar
86
+ gemspec: remove olddoc from build dependency
87
+ doc: add version annotations for new features
88
+ unicorn 5.3.0.pre1
89
+ doc: note after_worker_exit is also 5.3.0+
90
+ test_exec: SO_KEEPALIVE value only needs to be true (take #2)
91
+
92
+ Jeremy Evans (7):
93
+ Add after_worker_exit configuration option
94
+ Fix code example in after_worker_exit documentation
95
+ Add support for chroot to Worker#user
96
+ Add after_worker_ready configuration option
97
+ Add worker_exec configuration option
98
+ Don't pass a block for fork when forking workers
99
+ Check for SocketError on first ccc attempt
100
+
101
+ Simon Eskildsen (1):
102
+ check_client_connection: use tcp state on linux
29
103
 
data/Links CHANGED
@@ -23,10 +23,10 @@ or services behind them.
23
23
  * {golden_brindle}[https://github.com/simonoff/golden_brindle] - tool to
24
24
  manage multiple unicorn instances/applications on a single server
25
25
 
26
- * {raindrops}[http://raindrops.bogomips.org/] - real-time stats for
26
+ * {raindrops}[https://bogomips.org/raindrops/] - real-time stats for
27
27
  preforking Rack servers
28
28
 
29
- * {UnXF}[http://bogomips.org/unxf/] Un-X-Forward* the Rack environment,
29
+ * {UnXF}[https://bogomips.org/unxf/] Un-X-Forward* the Rack environment,
30
30
  useful since unicorn is designed to be deployed behind a reverse proxy.
31
31
 
32
32
  === unicorn is written to work with
@@ -52,5 +52,5 @@ or services behind them.
52
52
  * {Mongrel}[http://rubygems.org/gems/mongrel] - the awesome webserver
53
53
  unicorn is based on
54
54
 
55
- * {david}[http://bogomips.org/david.git] - a tool to explain why you need
55
+ * {david}[https://bogomips.org/david.git] - a tool to explain why you need
56
56
  nginx in front of unicorn