unicorn 4.7.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +0 -1
- data/.gitattributes +5 -0
- data/.gitignore +2 -2
- data/.manifest +14 -21
- data/.olddoc.yml +22 -0
- data/Application_Timeouts +7 -7
- data/DESIGN +2 -4
- data/Documentation/.gitignore +1 -3
- data/Documentation/unicorn.1 +222 -0
- data/Documentation/unicorn_rails.1 +207 -0
- data/FAQ +23 -6
- data/GIT-VERSION-FILE +1 -1
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +139 -92
- data/HACKING +13 -28
- data/ISSUES +82 -19
- data/KNOWN_ISSUES +18 -18
- data/LATEST +22 -44
- data/LICENSE +2 -2
- data/Links +24 -22
- data/NEWS +729 -0
- data/PHILOSOPHY +0 -6
- data/README +50 -48
- data/Rakefile +0 -44
- data/SIGNALS +12 -3
- data/Sandbox +11 -10
- data/TODO +0 -2
- data/TUNING +30 -9
- data/archive/.gitignore +3 -0
- data/archive/slrnpull.conf +4 -0
- data/bin/unicorn +4 -2
- data/bin/unicorn_rails +3 -3
- data/examples/big_app_gc.rb +1 -1
- data/examples/init.sh +36 -8
- data/examples/logrotate.conf +17 -2
- data/examples/nginx.conf +14 -14
- data/examples/unicorn.conf.minimal.rb +2 -2
- data/examples/unicorn.conf.rb +14 -6
- data/examples/unicorn.socket +11 -0
- data/examples/unicorn@.service +40 -0
- data/ext/unicorn_http/common_field_optimization.h +23 -5
- data/ext/unicorn_http/ext_help.h +0 -20
- data/ext/unicorn_http/extconf.rb +37 -1
- data/ext/unicorn_http/global_variables.h +1 -1
- data/ext/unicorn_http/httpdate.c +2 -2
- data/ext/unicorn_http/unicorn_http.c +940 -644
- data/ext/unicorn_http/unicorn_http.rl +167 -170
- data/ext/unicorn_http/unicorn_http_common.rl +1 -1
- data/lib/unicorn/configurator.rb +110 -46
- data/lib/unicorn/const.rb +2 -25
- data/lib/unicorn/http_request.rb +110 -31
- data/lib/unicorn/http_response.rb +17 -31
- data/lib/unicorn/http_server.rb +292 -199
- data/lib/unicorn/launcher.rb +1 -1
- data/lib/unicorn/oob_gc.rb +16 -6
- data/lib/unicorn/socket_helper.rb +58 -78
- data/lib/unicorn/stream_input.rb +9 -11
- data/lib/unicorn/tee_input.rb +16 -11
- data/lib/unicorn/tmpio.rb +10 -6
- data/lib/unicorn/util.rb +5 -4
- data/lib/unicorn/version.rb +1 -1
- data/lib/unicorn/worker.rb +99 -22
- data/lib/unicorn.rb +69 -42
- data/man/man1/unicorn.1 +124 -122
- data/man/man1/unicorn_rails.1 +113 -127
- data/t/.gitignore +0 -1
- data/t/GNUmakefile +3 -80
- data/t/README +4 -4
- data/t/t0002-parser-error.sh +3 -3
- data/t/t0011-active-unix-socket.sh +1 -1
- data/t/t0012-reload-empty-config.sh +2 -1
- data/t/t0300-no-default-middleware.sh +6 -1
- data/t/t0301-no-default-middleware-ignored-in-config.sh +25 -0
- data/t/t0301.ru +13 -0
- data/t/test-lib.sh +2 -2
- data/test/benchmark/README +14 -4
- data/test/benchmark/ddstream.ru +50 -0
- data/test/benchmark/readinput.ru +40 -0
- data/test/benchmark/uconnect.perl +66 -0
- data/test/exec/test_exec.rb +74 -20
- data/test/test_helper.rb +42 -33
- data/test/unit/test_ccc.rb +91 -0
- data/test/unit/test_droplet.rb +1 -1
- data/test/unit/test_http_parser.rb +49 -19
- data/test/unit/test_http_parser_ng.rb +98 -115
- data/test/unit/test_request.rb +11 -11
- data/test/unit/test_response.rb +31 -19
- data/test/unit/test_server.rb +89 -15
- data/test/unit/test_signals.rb +9 -9
- data/test/unit/test_socket_helper.rb +20 -14
- data/test/unit/test_tee_input.rb +10 -0
- data/test/unit/test_upload.rb +10 -15
- data/test/unit/test_util.rb +28 -3
- data/unicorn.gemspec +28 -23
- data/unicorn_1 +1 -0
- data/unicorn_rails_1 +1 -0
- metadata +64 -134
- data/.wrongdoc.yml +0 -10
- data/ChangeLog +0 -4694
- data/Documentation/GNUmakefile +0 -30
- data/Documentation/unicorn.1.txt +0 -178
- data/Documentation/unicorn_rails.1.txt +0 -175
- data/examples/git.ru +0 -13
- data/lib/unicorn/app/exec_cgi.rb +0 -154
- data/lib/unicorn/app/inetd.rb +0 -109
- data/lib/unicorn/ssl_client.rb +0 -11
- data/lib/unicorn/ssl_configurator.rb +0 -104
- data/lib/unicorn/ssl_server.rb +0 -42
- data/local.mk.sample +0 -59
- data/script/isolate_for_tests +0 -32
- data/t/hijack.ru +0 -42
- data/t/sslgen.sh +0 -71
- data/t/t0016-trust-x-forwarded-false.sh +0 -30
- data/t/t0017-trust-x-forwarded-true.sh +0 -30
- data/t/t0200-rack-hijack.sh +0 -27
- data/t/t0600-https-server-basic.sh +0 -48
- data/test/unit/test_http_parser_xftrust.rb +0 -38
- data/test/unit/test_sni_hostnames.rb +0 -47
data/KNOWN_ISSUES
CHANGED
@@ -9,24 +9,14 @@ 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
|
-
|
12
|
+
https://yhbt.net/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
|
16
|
-
reset in the after_fork hook. Starting with
|
16
|
+
reset in the after_fork hook. Starting with unicorn 3.6.1, we
|
17
17
|
have builtin workarounds for Kernel#rand and OpenSSL::Random users,
|
18
18
|
but applications may use other PRNGs.
|
19
19
|
|
20
|
-
* Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
|
21
|
-
after_fork hook to get correct random number generation. We have a builtin
|
22
|
-
workaround for this starting with \Unicorn 3.6.1
|
23
|
-
|
24
|
-
See http://redmine.ruby-lang.org/issues/show/4338
|
25
|
-
|
26
|
-
* On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
|
27
|
-
stdio that causes failure for file uploads larger than 112K. Upgrade
|
28
|
-
your version of Ruby or continue using Unicorn 1.x/3.4.x.
|
29
|
-
|
30
20
|
* For notes on sandboxing tools such as Bundler or Isolate,
|
31
21
|
see the {Sandbox}[link:Sandbox.html] page.
|
32
22
|
|
@@ -44,23 +34,33 @@ acceptable solution. Those issues are documented here.
|
|
44
34
|
|
45
35
|
== Known Issues (Old)
|
46
36
|
|
37
|
+
* Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
|
38
|
+
after_fork hook to get correct random number generation. We have a builtin
|
39
|
+
workaround for this starting with unicorn 3.6.1
|
40
|
+
|
41
|
+
See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/36450
|
42
|
+
|
43
|
+
* On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
|
44
|
+
stdio that causes failure for file uploads larger than 112K. Upgrade
|
45
|
+
your version of Ruby or continue using unicorn 1.x/3.4.x.
|
46
|
+
|
47
47
|
* Under Ruby 1.9.1, methods like Array#shuffle and Array#sample will
|
48
48
|
segfault if called after forking. Upgrade to Ruby 1.9.2 or call
|
49
49
|
"Kernel.rand" in your after_fork hook to reinitialize the random
|
50
50
|
number generator.
|
51
51
|
|
52
|
-
See http://
|
52
|
+
See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/28655
|
53
53
|
|
54
54
|
* Rails 2.3.2 bundles its own version of Rack. This may cause subtle
|
55
55
|
bugs when simultaneously loaded with the system-wide Rack Rubygem
|
56
|
-
which
|
56
|
+
which unicorn depends on. Upgrading to Rails 2.3.4 (or later) is
|
57
57
|
strongly recommended for all Rails 2.3.x users for this (and security
|
58
58
|
reasons). Rails 2.2.x series (or before) did not bundle Rack and are
|
59
59
|
should be unnaffected. If there is any reason which forces your
|
60
60
|
application to use Rails 2.3.2 and you have no other choice, then
|
61
|
-
you may edit your
|
61
|
+
you may edit your unicorn gemspec and remove the Rack dependency.
|
62
62
|
|
63
|
-
ref:
|
63
|
+
ref: https://yhbt.net/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
|
|
@@ -71,9 +71,9 @@ acceptable solution. Those issues are documented here.
|
|
71
71
|
set :env, :production
|
72
72
|
set :run, false
|
73
73
|
Since this is no longer an issue with Sinatra 0.9.x apps, this will not be
|
74
|
-
fixed on our end. Since
|
74
|
+
fixed on our end. Since unicorn is itself the application launcher, the
|
75
75
|
at_exit handler used in old Sinatra always caused Mongrel to be launched
|
76
|
-
whenever a
|
76
|
+
whenever a unicorn worker was about to exit.
|
77
77
|
|
78
78
|
Also remember we're capable of replacing the running binary without dropping
|
79
79
|
any connections regardless of framework :)
|
data/LATEST
CHANGED
@@ -1,45 +1,23 @@
|
|
1
|
-
=== unicorn
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
In case the GPLv4 arrives and I am not alive to approve/review it,
|
24
|
-
the lesser of evils is have give blanket approval of all future GPL
|
25
|
-
versions (as published by the FSF). The worse evil is to be stuck
|
26
|
-
with a license which cannot guarantee the Free-ness of this project
|
27
|
-
in the future.
|
28
|
-
|
29
|
-
This unfortunately means the FSF can theoretically come out with
|
30
|
-
license terms I do not agree with, but the GPLv2 and GPLv3 will
|
31
|
-
always be an option to all users.
|
32
|
-
|
33
|
-
Note: we currently prefer GPLv3
|
34
|
-
|
35
|
-
Two improvements thanks to Ernest W. Durbin III:
|
36
|
-
|
37
|
-
* USR2 redirects fixed for Ruby 1.8.6 (broken since 4.1.0)
|
38
|
-
* unicorn(1) and unicorn_rails(1) enforces valid integer for -p/--port
|
39
|
-
|
40
|
-
A few more odd, minor tweaks and fixes:
|
41
|
-
|
42
|
-
* attempt to rename PID file when possible (on USR2)
|
43
|
-
* workaround reopen atomicity issues for stdio vs non-stdio
|
44
|
-
* improve handling of client-triggerable socket errors
|
1
|
+
=== unicorn 5.5.0 / 2019-03-04 00:41 UTC
|
2
|
+
|
3
|
+
Mostly identical to 5.5.0.pre1, which I didn't hear any feedback
|
4
|
+
from:
|
5
|
+
|
6
|
+
https://bogomips.org/unicorn-public/20181220222842.GA27382@dcvr/
|
7
|
+
|
8
|
+
> Jeremy Evans contributed the "default_middleware" configuration option:
|
9
|
+
>
|
10
|
+
> https://bogomips.org/unicorn-public/20180913192055.GD48926@jeremyevans.local/
|
11
|
+
>
|
12
|
+
> Jeremy also contributed the ability to use separate groups for the process
|
13
|
+
> and log files:
|
14
|
+
>
|
15
|
+
> https://bogomips.org/unicorn-public/20180913192449.GE48926@jeremyevans.local/
|
16
|
+
>
|
17
|
+
> There's also a couple of uninteresting minor optimizations and
|
18
|
+
> documentation additions.
|
19
|
+
|
20
|
+
Otherwise, there's one extra change to use
|
21
|
+
rb_gc_register_mark_object which is finally a documented part of
|
22
|
+
the Ruby C-API, but has existed since the 1.9 days.
|
45
23
|
|
data/LICENSE
CHANGED
@@ -8,8 +8,8 @@ any later version. We currently prefer the GPLv3 or later for
|
|
8
8
|
derivative works, but the GPLv2 is fine.
|
9
9
|
|
10
10
|
The complete texts of the GPLv2 and GPLv3 are below:
|
11
|
-
GPLv2 -
|
12
|
-
GPLv3 -
|
11
|
+
GPLv2 - https://www.gnu.org/licenses/gpl-2.0.txt
|
12
|
+
GPLv3 - https://www.gnu.org/licenses/gpl-3.0.txt
|
13
13
|
|
14
14
|
You may (against our _preference_) also use the Ruby 1.8 license terms
|
15
15
|
which we inherited from the original Mongrel project when we forked it:
|
data/Links
CHANGED
@@ -1,56 +1,58 @@
|
|
1
1
|
= Related Projects
|
2
2
|
|
3
|
-
If you're interested in
|
3
|
+
If you're interested in unicorn, you may be interested in some of the projects
|
4
4
|
listed below. If you have any links to add/change/remove, please tell us at
|
5
|
-
mailto:
|
5
|
+
mailto:unicorn-public@yhbt.net!
|
6
6
|
|
7
7
|
== Disclaimer
|
8
8
|
|
9
|
-
The
|
10
|
-
Furthermore, the
|
9
|
+
The unicorn project is not responsible for the content in these links.
|
10
|
+
Furthermore, the unicorn project has never, does not and will never endorse:
|
11
11
|
|
12
12
|
* any for-profit entities or services
|
13
|
-
* any non-{Free Software}[
|
13
|
+
* any non-{Free Software}[https://www.gnu.org/philosophy/free-sw.html]
|
14
14
|
|
15
15
|
The existence of these links does not imply endorsement of any entities
|
16
16
|
or services behind them.
|
17
17
|
|
18
|
-
=== For use with
|
18
|
+
=== For use with unicorn
|
19
19
|
|
20
20
|
* {Bluepill}[https://github.com/arya/bluepill] -
|
21
21
|
a simple process monitoring tool written in Ruby
|
22
22
|
|
23
23
|
* {golden_brindle}[https://github.com/simonoff/golden_brindle] - tool to
|
24
|
-
manage multiple
|
24
|
+
manage multiple unicorn instances/applications on a single server
|
25
25
|
|
26
|
-
* {raindrops}[
|
26
|
+
* {raindrops}[https://yhbt.net/raindrops/] - real-time stats for
|
27
27
|
preforking Rack servers
|
28
28
|
|
29
|
-
* {UnXF}[
|
29
|
+
* {UnXF}[https://yhbt.net/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
|
33
33
|
|
34
|
-
* {Rack}[
|
34
|
+
* {Rack}[https://rack.github.io/] - a minimal interface between webservers
|
35
35
|
supporting Ruby and Ruby frameworks
|
36
36
|
|
37
|
-
* {Ruby}[
|
37
|
+
* {Ruby}[https://www.ruby-lang.org/en/] - the programming language of
|
38
|
+
Rack and unicorn
|
38
39
|
|
39
|
-
* {nginx}[
|
40
|
-
|
41
|
-
* {kgio}[http://bogomips.org/kgio/] - the I/O library written for \Unicorn
|
40
|
+
* {nginx}[https://nginx.org/] (Free versions) -
|
41
|
+
the reverse proxy for use with unicorn
|
42
42
|
|
43
43
|
=== Derivatives
|
44
44
|
|
45
|
-
* {Green Unicorn}[
|
45
|
+
* {Green Unicorn}[https://gunicorn.org/] - a Python version of unicorn
|
46
46
|
|
47
|
-
* {
|
48
|
-
|
47
|
+
* {Starman}[https://metacpan.org/release/Starman/] - Plack/PSGI version
|
48
|
+
of unicorn
|
49
49
|
|
50
50
|
=== Prior Work
|
51
51
|
|
52
|
-
* {Mongrel}[
|
53
|
-
based on
|
52
|
+
* {Mongrel}[https://rubygems.org/gems/mongrel] - the awesome webserver
|
53
|
+
unicorn is based on. A historical archive of the mongrel dev list
|
54
|
+
featuring early discussions of unicorn is available at:
|
55
|
+
https://yhbt.net/mongrel-devel/
|
54
56
|
|
55
|
-
* {david}[
|
56
|
-
nginx in front of
|
57
|
+
* {david}[https://yhbt.net/david.git] - a tool to explain why you need
|
58
|
+
nginx in front of unicorn
|