unicorn 5.5.1 → 5.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.manifest +5 -3
  3. data/.olddoc.yml +12 -7
  4. data/Documentation/.gitignore +1 -3
  5. data/Documentation/unicorn.1 +222 -0
  6. data/Documentation/unicorn_rails.1 +207 -0
  7. data/FAQ +1 -1
  8. data/GIT-VERSION-FILE +1 -1
  9. data/GIT-VERSION-GEN +1 -1
  10. data/GNUmakefile +110 -56
  11. data/HACKING +1 -1
  12. data/ISSUES +16 -13
  13. data/KNOWN_ISSUES +2 -2
  14. data/Links +5 -5
  15. data/README +13 -6
  16. data/SIGNALS +1 -1
  17. data/Sandbox +2 -2
  18. data/archive/slrnpull.conf +1 -1
  19. data/examples/big_app_gc.rb +1 -1
  20. data/examples/logrotate.conf +2 -2
  21. data/examples/nginx.conf +1 -1
  22. data/examples/unicorn.conf.minimal.rb +2 -2
  23. data/examples/unicorn.conf.rb +2 -2
  24. data/examples/unicorn@.service +7 -0
  25. data/ext/unicorn_http/extconf.rb +5 -0
  26. data/ext/unicorn_http/unicorn_http.c +253 -215
  27. data/ext/unicorn_http/unicorn_http.rl +43 -5
  28. data/lib/unicorn/configurator.rb +13 -3
  29. data/lib/unicorn/http_request.rb +11 -0
  30. data/lib/unicorn/http_server.rb +32 -4
  31. data/lib/unicorn/oob_gc.rb +2 -2
  32. data/lib/unicorn/tmpio.rb +8 -2
  33. data/lib/unicorn/version.rb +1 -1
  34. data/lib/unicorn.rb +1 -1
  35. data/man/man1/unicorn.1 +89 -88
  36. data/man/man1/unicorn_rails.1 +77 -79
  37. data/t/GNUmakefile +3 -72
  38. data/test/benchmark/README +14 -4
  39. data/test/benchmark/ddstream.ru +50 -0
  40. data/test/benchmark/readinput.ru +40 -0
  41. data/test/benchmark/uconnect.perl +66 -0
  42. data/test/exec/test_exec.rb +9 -7
  43. data/test/test_helper.rb +22 -30
  44. data/test/unit/test_http_parser_ng.rb +81 -0
  45. data/test/unit/test_server.rb +30 -0
  46. data/test/unit/test_upload.rb +4 -9
  47. data/test/unit/test_util.rb +1 -1
  48. data/unicorn.gemspec +8 -7
  49. metadata +12 -9
  50. data/Documentation/GNUmakefile +0 -30
  51. data/Documentation/unicorn.1.txt +0 -187
  52. data/Documentation/unicorn_rails.1.txt +0 -173
data/GNUmakefile CHANGED
@@ -10,6 +10,7 @@ RAGEL = ragel
10
10
  RSYNC = rsync
11
11
  OLDDOC = olddoc
12
12
  RDOC = rdoc
13
+ INSTALL = install
13
14
 
14
15
  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
15
16
  @./GIT-VERSION-GEN
@@ -25,7 +26,38 @@ endif
25
26
 
26
27
  RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))')
27
28
 
28
- MYLIBS = $(RUBYLIB)
29
+ # we should never package more than one ext to avoid DSO proliferation:
30
+ # https://udrepper.livejournal.com/8790.html
31
+ ext := $(firstword $(wildcard ext/*))
32
+
33
+ ragel: $(ext)/unicorn_http.c
34
+
35
+ rl_files := $(wildcard $(ext)/*.rl)
36
+ ragel: $(ext)/unicorn_http.c
37
+ $(ext)/unicorn_http.c: $(rl_files)
38
+ cd $(@D) && $(RAGEL) unicorn_http.rl -C $(RLFLAGS) -o $(@F)
39
+ ext_pfx := test/$(RUBY_ENGINE)-$(RUBY_VERSION)
40
+ tmp_bin := $(ext_pfx)/bin
41
+ ext_h := $(wildcard $(ext)/*/*.h $(ext)/*.h)
42
+ ext_src := $(sort $(wildcard $(ext)/*.c) $(ext_h) $(ext)/unicorn_http.c)
43
+ ext_pfx_src := $(addprefix $(ext_pfx)/,$(ext_src))
44
+ ext_dir := $(ext_pfx)/$(ext)
45
+ $(ext)/extconf.rb: $(wildcard $(ext)/*.h)
46
+ @>>$@
47
+ $(ext_dir) $(tmp_bin) man/man1 doc/man1 pkg t/trash:
48
+ @mkdir -p $@
49
+ $(ext_pfx)/$(ext)/%: $(ext)/% | $(ext_dir)
50
+ $(INSTALL) -m 644 $< $@
51
+ $(ext_pfx)/$(ext)/Makefile: $(ext)/extconf.rb $(ext_h) | $(ext_dir)
52
+ $(RM) -f $(@D)/*.o
53
+ cd $(@D) && $(RUBY) $(CURDIR)/$(ext)/extconf.rb $(EXTCONF_ARGS)
54
+ ext_sfx := _ext.$(DLEXT)
55
+ ext_dl := $(ext_pfx)/$(ext)/$(notdir $(ext)_ext.$(DLEXT))
56
+ $(ext_dl): $(ext_src) $(ext_pfx_src) $(ext_pfx)/$(ext)/Makefile
57
+ $(MAKE) -C $(@D)
58
+ lib := $(CURDIR)/lib:$(CURDIR)/$(ext_pfx)/$(ext)
59
+ http build: $(ext_dl)
60
+ $(ext_pfx)/$(ext)/unicorn_http.c: ext/unicorn_http/unicorn_http.c
29
61
 
30
62
  # dunno how to implement this as concisely in Ruby, and hell, I love awk
31
63
  awk_slow := awk '/def test_/{print FILENAME"--"$$2".n"}' 2>/dev/null
@@ -37,44 +69,21 @@ T := $(filter-out $(slow_tests), $(wildcard test/*/test*.rb))
37
69
  T_n := $(shell $(awk_slow) $(slow_tests))
38
70
  T_log := $(subst .rb,$(log_suffix),$(T))
39
71
  T_n_log := $(subst .n,$(log_suffix),$(T_n))
40
- test_prefix = $(CURDIR)/test/$(RUBY_ENGINE)-$(RUBY_VERSION)
41
72
 
42
- ext := ext/unicorn_http
43
- c_files := $(ext)/unicorn_http.c $(ext)/httpdate.c $(wildcard $(ext)/*.h)
44
- rl_files := $(wildcard $(ext)/*.rl)
45
73
  base_bins := unicorn unicorn_rails
46
74
  bins := $(addprefix bin/, $(base_bins))
47
75
  man1_rdoc := $(addsuffix _1, $(base_bins))
48
76
  man1_bins := $(addsuffix .1, $(base_bins))
49
77
  man1_paths := $(addprefix man/man1/, $(man1_bins))
50
- rb_files := $(bins) $(shell find lib ext -type f -name '*.rb')
51
- inst_deps := $(c_files) $(rb_files) GNUmakefile test/test_helper.rb
78
+ tmp_bins = $(addprefix $(tmp_bin)/, unicorn unicorn_rails)
79
+ pid := $(shell echo $$PPID)
52
80
 
53
- ragel: $(ext)/unicorn_http.c
54
- $(ext)/unicorn_http.c: $(rl_files)
55
- cd $(@D) && $(RAGEL) unicorn_http.rl -C $(RLFLAGS) -o $(@F)
56
- $(ext)/Makefile: $(ext)/extconf.rb $(c_files)
57
- cd $(@D) && $(RUBY) extconf.rb
58
- $(ext)/unicorn_http.$(DLEXT): $(ext)/Makefile
59
- $(MAKE) -C $(@D)
60
- http: $(ext)/unicorn_http.$(DLEXT)
61
-
62
- # only used for tests
63
- http-install: $(ext)/unicorn_http.$(DLEXT)
64
- install -m644 $< lib/
81
+ $(tmp_bin)/%: bin/% | $(tmp_bin)
82
+ $(INSTALL) -m 755 $< $@.$(pid)
83
+ $(MRI) -i -p -e '$$_.gsub!(%r{^#!.*$$},"#!$(ruby_bin)")' $@.$(pid)
84
+ mv $@.$(pid) $@
65
85
 
66
- test-install: $(test_prefix)/.stamp
67
- $(test_prefix)/.stamp: $(inst_deps)
68
- mkdir -p $(test_prefix)/.ccache
69
- tar cf - $(inst_deps) GIT-VERSION-GEN | \
70
- (cd $(test_prefix) && tar xf -)
71
- $(MAKE) -C $(test_prefix) clean
72
- $(MAKE) -C $(test_prefix) http-install shebang RUBY="$(RUBY)"
73
- > $@
74
-
75
- # this is only intended to be run within $(test_prefix)
76
- shebang: $(bins)
77
- $(MRI) -i -p -e '$$_.gsub!(%r{^#!.*$$},"#!$(ruby_bin)")' $^
86
+ bins: $(tmp_bins)
78
87
 
79
88
  t_log := $(T_log) $(T_n_log)
80
89
  test: $(T) $(T_n)
@@ -83,15 +92,54 @@ test: $(T) $(T_n)
83
92
 
84
93
  test-exec: $(wildcard test/exec/test_*.rb)
85
94
  test-unit: $(wildcard test/unit/test_*.rb)
86
- $(slow_tests): $(test_prefix)/.stamp
95
+ $(slow_tests): $(ext_dl)
87
96
  @$(MAKE) $(shell $(awk_slow) $@)
88
97
 
89
98
  # ensure we can require just the HTTP parser without the rest of unicorn
90
- test-require: $(ext)/unicorn_http.$(DLEXT)
91
- $(RUBY) --disable-gems -I$(ext) -runicorn_http -e Unicorn
99
+ test-require: $(ext_dl)
100
+ $(RUBY) --disable-gems -I$(ext_pfx)/$(ext) -runicorn_http -e Unicorn
101
+
102
+ test_prereq := $(tmp_bins) $(ext_dl)
103
+
104
+ SH_TEST_OPTS =
105
+ ifdef V
106
+ ifeq ($(V),2)
107
+ SH_TEST_OPTS += --trace
108
+ else
109
+ SH_TEST_OPTS += --verbose
110
+ endif
111
+ endif
92
112
 
93
- test-integration: $(test_prefix)/.stamp
94
- $(MAKE) -C t
113
+ # do we trust Ruby behavior to be stable? some tests are
114
+ # (mostly) POSIX sh (not bash or ksh93, so no "set -o pipefail"
115
+ # TRACER = strace -f -o $(t_pfx).strace -s 100000
116
+ # TRACER = /usr/bin/time -o $(t_pfx).time
117
+ t_pfx = trash/$@-$(RUBY_ENGINE)-$(RUBY_VERSION)
118
+ T_sh = $(wildcard t/t[0-9][0-9][0-9][0-9]-*.sh)
119
+ $(T_sh): export RUBY := $(RUBY)
120
+ $(T_sh): export PATH := $(CURDIR)/$(tmp_bin):$(PATH)
121
+ $(T_sh): export RUBYLIB := $(lib):$(RUBYLIB)
122
+ $(T_sh): dep $(test_prereq) t/random_blob t/trash/.gitignore
123
+ cd t && $(TRACER) $(SHELL) $(SH_TEST_OPTS) $(@F) $(TEST_OPTS)
124
+
125
+ t/trash/.gitignore : | t/trash
126
+ echo '*' >$@
127
+
128
+ dependencies := socat curl
129
+ deps := $(addprefix t/.dep+,$(dependencies))
130
+ $(deps): dep_bin = $(lastword $(subst +, ,$@))
131
+ $(deps):
132
+ @which $(dep_bin) > $@.$(pid) 2>/dev/null || :
133
+ @test -s $@.$(pid) || \
134
+ { echo >&2 "E '$(dep_bin)' not found in PATH=$(PATH)"; exit 1; }
135
+ @mv $@.$(pid) $@
136
+ dep: $(deps)
137
+
138
+ t/random_blob:
139
+ dd if=/dev/urandom bs=1M count=30 of=$@.$(pid)
140
+ mv $@.$(pid) $@
141
+
142
+ test-integration: $(T_sh)
95
143
 
96
144
  check: test-require test test-integration
97
145
  test-all: check
@@ -122,16 +170,16 @@ run_test = $(quiet_pre) \
122
170
 
123
171
  %.n: arg = $(subst .n,,$(subst --, -n ,$@))
124
172
  %.n: t = $(subst .n,$(log_suffix),$@)
125
- %.n: export PATH := $(test_prefix)/bin:$(PATH)
126
- %.n: export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
127
- %.n: $(test_prefix)/.stamp
173
+ %.n: export PATH := $(CURDIR)/$(tmp_bin):$(PATH)
174
+ %.n: export RUBYLIB := $(lib):$(RUBYLIB)
175
+ %.n: $(test_prereq)
128
176
  $(run_test)
129
177
 
130
178
  $(T): arg = $@
131
179
  $(T): t = $(subst .rb,$(log_suffix),$@)
132
- $(T): export PATH := $(test_prefix)/bin:$(PATH)
133
- $(T): export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
134
- $(T): $(test_prefix)/.stamp
180
+ $(T): export PATH := $(CURDIR)/$(tmp_bin):$(PATH)
181
+ $(T): export RUBYLIB := $(lib):$(RUBYLIB)
182
+ $(T): $(test_prereq)
135
183
  $(run_test)
136
184
 
137
185
  install: $(bins) $(ext)/unicorn_http.c
@@ -150,13 +198,21 @@ prep_setup_rb := @-$(RM) $(setup_rb_files);$(MAKE) -C $(ext) clean
150
198
 
151
199
  clean:
152
200
  -$(MAKE) -C $(ext) clean
153
- -$(MAKE) -C Documentation clean
154
201
  $(RM) $(ext)/Makefile
155
202
  $(RM) $(setup_rb_files) $(t_log)
156
- $(RM) -r $(test_prefix) man
203
+ $(RM) -r $(ext_pfx) man t/trash
204
+ $(RM) $(html1)
205
+
206
+ man1 := $(addprefix Documentation/, unicorn.1 unicorn_rails.1)
207
+ html1 := $(addsuffix .html, $(man1))
208
+ man : $(man1) | man/man1
209
+ $(INSTALL) -m 644 $(man1) man/man1
210
+
211
+ html : $(html1) | doc/man1
212
+ $(INSTALL) -m 644 $(html1) doc/man1
157
213
 
158
- man html:
159
- $(MAKE) -C Documentation install-$@
214
+ %.1.html: %.1
215
+ $(OLDDOC) man2html -o $@ ./$<
160
216
 
161
217
  pkg_extra := GIT-VERSION-FILE lib/unicorn/version.rb LATEST NEWS \
162
218
  $(ext)/unicorn_http.c $(man1_paths)
@@ -177,19 +233,19 @@ doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS)
177
233
  $(OLDDOC) prepare
178
234
  $(RDOC) -f dark216
179
235
  $(OLDDOC) merge
180
- install -m644 COPYING doc/COPYING
181
- install -m644 NEWS.atom.xml doc/NEWS.atom.xml
182
- install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
183
- install -m644 $(man1_paths) doc/
236
+ $(INSTALL) -m 644 COPYING doc/COPYING
237
+ $(INSTALL) -m 644 NEWS.atom.xml doc/NEWS.atom.xml
238
+ $(INSTALL) -m 644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
239
+ $(INSTALL) -m 644 $(man1_paths) doc/
184
240
  tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
185
241
 
186
- # publishes docs to https://bogomips.org/unicorn/
242
+ # publishes docs to https://yhbt.net/unicorn/
187
243
  publish_doc:
188
244
  -git set-file-times
189
245
  $(MAKE) doc
190
246
  $(MAKE) doc_gz
191
247
  chmod 644 $$(find doc -type f)
192
- $(RSYNC) -av doc/ bogomips.org:/srv/bogomips/unicorn/
248
+ $(RSYNC) -av doc/ yhbt.net:/srv/yhbt/unicorn/
193
249
  git ls-files | xargs touch
194
250
 
195
251
  # Create gzip variants of the same timestamp as the original so nginx
@@ -221,9 +277,8 @@ gem: $(pkggem)
221
277
  install-gem: $(pkggem)
222
278
  gem install --local $(CURDIR)/$<
223
279
 
224
- $(pkggem): .manifest fix-perms
280
+ $(pkggem): .manifest fix-perms | pkg
225
281
  gem build $(rfpackage).gemspec
226
- mkdir -p pkg
227
282
  mv $(@F) $@
228
283
 
229
284
  $(pkgtgz): distdir = $(basename $@)
@@ -254,5 +309,4 @@ check-warnings:
254
309
  do $(RUBY) --disable-gems -d -W2 -c \
255
310
  $$i; done) | grep -v '^Syntax OK$$' || :
256
311
 
257
- .PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) man
258
- .PHONY: test-install
312
+ .PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) man $(T_sh) clean
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
- <tt>https://bogomips.org/unicorn-public/$MESSAGE_ID/</tt> if possible
60
+ <tt>https://yhbt.net/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
 
data/ISSUES CHANGED
@@ -1,9 +1,9 @@
1
1
  = Issues
2
2
 
3
- mailto:unicorn-public@bogomips.org is the best place to report bugs,
3
+ mailto:unicorn-public@yhbt.net is the best place to report bugs,
4
4
  submit patches and/or obtain support after you have searched the
5
- {email archives}[https://bogomips.org/unicorn-public/] and
6
- {documentation}[https://bogomips.org/unicorn/].
5
+ {email archives}[https://yhbt.net/unicorn-public/] and
6
+ {documentation}[https://yhbt.net/unicorn/].
7
7
 
8
8
  * No subscription will ever be required to email us
9
9
  * Cc: all participants in a thread or commit, as subscription is optional
@@ -12,12 +12,12 @@ submit patches and/or obtain support after you have searched the
12
12
  * Do not send HTML mail or images,
13
13
  they hurt reader privacy and will be flagged as spam
14
14
  * Anonymous and pseudonymous messages will ALWAYS be welcome
15
- * The email submission port (587) is enabled on the bogomips.org MX:
16
- https://bogomips.org/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
15
+ * The email submission port (587) is enabled on the yhbt.net MX:
16
+ https://yhbt.net/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
17
17
 
18
18
  We will never have a centralized or formal bug tracker. Instead we
19
19
  can interoperate with any bug tracker which can Cc: us plain-text to
20
- mailto:unicorn-public@bogomips.org This includes the Debian BTS
20
+ mailto:unicorn-public@yhbt.net This includes the Debian BTS
21
21
  at https://bugs.debian.org/unicorn and possibly others.
22
22
 
23
23
  If your issue is of a sensitive nature or you're just shy in public,
@@ -73,24 +73,27 @@ document distributed with git) on guidelines for patch submission.
73
73
 
74
74
  == Contact Info
75
75
 
76
- * public: mailto:unicorn-public@bogomips.org
77
- * nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
76
+ * public: mailto:unicorn-public@yhbt.net
77
+ * nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
78
78
  * nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
79
- * https://bogomips.org/unicorn-public/
79
+ * imaps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn.0
80
+ * https://yhbt.net/unicorn-public/
80
81
  * http://ou63pmih66umazou.onion/unicorn-public/
81
82
 
82
83
  Mailing list subscription is optional, so Cc: all participants.
83
84
 
84
- You can follow along via NNTP (read-only):
85
+ You can follow along via NNTP or IMAP (read-only):
85
86
 
86
87
  nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
87
- nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
88
+ nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
89
+ imaps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn.0
90
+ imap://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn.0
88
91
 
89
92
  Or Atom feeds:
90
93
 
91
- https://bogomips.org/unicorn-public/new.atom
94
+ https://yhbt.net/unicorn-public/new.atom
92
95
  http://ou63pmih66umazou.onion/unicorn-public/new.atom
93
96
 
94
- The HTML archives at https://bogomips.org/unicorn-public/
97
+ The HTML archives at https://yhbt.net/unicorn-public/
95
98
  also has links to per-thread Atom feeds and downloadable
96
99
  mboxes.
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
- https://bogomips.org/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/
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
@@ -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: https://bogomips.org/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/
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
 
data/Links CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
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:unicorn-public@bogomips.org!
5
+ mailto:unicorn-public@yhbt.net!
6
6
 
7
7
  == Disclaimer
8
8
 
@@ -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}[https://bogomips.org/raindrops/] - real-time stats for
26
+ * {raindrops}[https://yhbt.net/raindrops/] - real-time stats for
27
27
  preforking Rack servers
28
28
 
29
- * {UnXF}[https://bogomips.org/unxf/] Un-X-Forward* the Rack environment,
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
@@ -52,7 +52,7 @@ or services behind them.
52
52
  * {Mongrel}[https://rubygems.org/gems/mongrel] - the awesome webserver
53
53
  unicorn is based on. A historical archive of the mongrel dev list
54
54
  featuring early discussions of unicorn is available at:
55
- https://bogomips.org/mongrel-devel/
55
+ https://yhbt.net/mongrel-devel/
56
56
 
57
- * {david}[https://bogomips.org/david.git] - a tool to explain why you need
57
+ * {david}[https://yhbt.net/david.git] - a tool to explain why you need
58
58
  nginx in front of unicorn
data/README CHANGED
@@ -80,12 +80,12 @@ You may install it via RubyGems on RubyGems.org:
80
80
  You can get the latest source via git from the following locations
81
81
  (these versions may not be stable):
82
82
 
83
- https://bogomips.org/unicorn.git
83
+ https://yhbt.net/unicorn.git
84
84
  https://repo.or.cz/unicorn.git (mirror)
85
85
 
86
86
  You may browse the code from the web:
87
87
 
88
- * https://bogomips.org/unicorn.git
88
+ * https://yhbt.net/unicorn.git
89
89
  * https://repo.or.cz/w/unicorn.git (gitweb)
90
90
 
91
91
  See the HACKING guide on how to contribute and build prerelease gems
@@ -133,13 +133,20 @@ and libraries which run on top of it.
133
133
 
134
134
  All feedback (bug reports, user/development dicussion, patches, pull
135
135
  requests) go to the mailing list/newsgroup. See the ISSUES document for
136
- information on the {mailing list}[mailto:unicorn-public@bogomips.org].
136
+ information on the {mailing list}[mailto:unicorn-public@yhbt.net].
137
+
138
+ The mailing list is archived at https://yhbt.net/unicorn-public/
137
139
 
138
- The mailing list is archived at https://bogomips.org/unicorn-public/
139
140
  Read-only NNTP access is available at:
140
141
  nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn and
141
- nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
142
+ nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
143
+
144
+ Read-only IMAP access is also avaialble at:
145
+ imaps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn.0 and
146
+ imap://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn.0
147
+ AUTH=ANONYMOUS mechanism is supported, as is any username+password
148
+ combination.
142
149
 
143
150
  For the latest on unicorn releases, you may also finger us at
144
- unicorn@bogomips.org or check our NEWS page (and subscribe to our Atom
151
+ unicorn@yhbt.net or check our NEWS page (and subscribe to our Atom
145
152
  feed).
data/SIGNALS CHANGED
@@ -8,7 +8,7 @@ should be possible to easily share process management scripts between
8
8
  Unicorn and nginx.
9
9
 
10
10
  One example init script is distributed with unicorn:
11
- https://bogomips.org/unicorn/examples/init.sh
11
+ https://yhbt.net/unicorn/examples/init.sh
12
12
 
13
13
  === Master Process
14
14
 
data/Sandbox CHANGED
@@ -34,7 +34,7 @@ is the primary issue with sandboxing tools such as Bundler and Isolate.
34
34
  If you're bundling unicorn, use "bundle exec unicorn" (or "bundle exec
35
35
  unicorn_rails") to start unicorn with the correct environment variables
36
36
 
37
- ref: https://bogomips.org/unicorn-public/9ECF07C4-5216-47BE-961D-AFC0F0C82060@internetfamo.us/
37
+ ref: https://yhbt.net/unicorn-public/9ECF07C4-5216-47BE-961D-AFC0F0C82060@internetfamo.us/
38
38
 
39
39
  Otherwise (if you choose to not sandbox your unicorn installation), we
40
40
  expect the tips for Isolate (below) apply, too.
@@ -44,7 +44,7 @@ expect the tips for Isolate (below) apply, too.
44
44
  This is no longer be an issue as of bundler 0.9.17
45
45
 
46
46
  ref:
47
- https://bogomips.org/unicorn-public/8FC34B23-5994-41CC-B5AF-7198EF06909E@tramchase.com/
47
+ https://yhbt.net/unicorn-public/8FC34B23-5994-41CC-B5AF-7198EF06909E@tramchase.com/
48
48
 
49
49
  === BUNDLE_GEMFILE for Capistrano users
50
50
 
@@ -1,4 +1,4 @@
1
1
  # group_name max expire headers_only
2
2
  gmane.comp.lang.ruby.unicorn.general 1000000000 1000000000 0
3
3
 
4
- # usage: slrnpull -d $PWD -h news.gmane.org --no-post
4
+ # usage: slrnpull -d $PWD -h news.gmane.io --no-post
@@ -1,2 +1,2 @@
1
- # see {Unicorn::OobGC}[https://bogomips.org/unicorn/Unicorn/OobGC.html]
1
+ # see {Unicorn::OobGC}[https://yhbt.net/unicorn/Unicorn/OobGC.html]
2
2
  # Unicorn::OobGC was broken in Unicorn v3.3.1 - v3.6.1 and fixed in v3.6.2
@@ -5,7 +5,7 @@
5
5
  # https://linux.die.net/man/8/logrotate
6
6
  #
7
7
  # public logrotate-related discussion in our archives:
8
- # https://bogomips.org/unicorn-public/?q=logrotate
8
+ # https://yhbt.net/unicorn-public/?q=logrotate
9
9
 
10
10
  # Modify the following glob to match the logfiles your app writes to:
11
11
  /var/log/unicorn_app/*.log {
@@ -33,7 +33,7 @@
33
33
  systemctl kill -s SIGUSR1 unicorn@2.service
34
34
 
35
35
  # Examples for other process management systems appreciated
36
- # Mail us at unicorn-public@bogomips.org
36
+ # Mail us at unicorn-public@yhbt.net
37
37
  # (see above for archives)
38
38
 
39
39
  # If you use a pid file and assuming your pid file
data/examples/nginx.conf CHANGED
@@ -113,7 +113,7 @@ http {
113
113
  # try_files directive appeared in in nginx 0.7.27 and has stabilized
114
114
  # over time. Older versions of nginx (e.g. 0.6.x) requires
115
115
  # "if (!-f $request_filename)" which was less efficient:
116
- # https://bogomips.org/unicorn.git/tree/examples/nginx.conf?id=v3.3.1#n127
116
+ # https://yhbt.net/unicorn.git/tree/examples/nginx.conf?id=v3.3.1#n127
117
117
  try_files $uri/index.html $uri.html $uri @app;
118
118
 
119
119
  location @app {
@@ -1,9 +1,9 @@
1
1
  # Minimal sample configuration file for Unicorn (not Rack) when used
2
2
  # with daemonization (unicorn -D) started in your working directory.
3
3
  #
4
- # See https://bogomips.org/unicorn/Unicorn/Configurator.html for complete
4
+ # See https://yhbt.net/unicorn/Unicorn/Configurator.html for complete
5
5
  # documentation.
6
- # See also https://bogomips.org/unicorn/examples/unicorn.conf.rb for
6
+ # See also https://yhbt.net/unicorn/examples/unicorn.conf.rb for
7
7
  # a more verbose configuration using more features.
8
8
 
9
9
  listen 2007 # by default Unicorn listens on port 8080
@@ -2,10 +2,10 @@
2
2
  #
3
3
  # This configuration file documents many features of Unicorn
4
4
  # that may not be needed for some applications. See
5
- # https://bogomips.org/unicorn/examples/unicorn.conf.minimal.rb
5
+ # https://yhbt.net/unicorn/examples/unicorn.conf.minimal.rb
6
6
  # for a much simpler configuration file.
7
7
  #
8
- # See https://bogomips.org/unicorn/Unicorn/Configurator.html for complete
8
+ # See https://yhbt.net/unicorn/Unicorn/Configurator.html for complete
9
9
  # documentation.
10
10
 
11
11
  # Use at least one worker per core if you're on a dedicated server,
@@ -14,7 +14,14 @@ After = unicorn.socket
14
14
  # bundler users must use the "--keep-file-descriptors" switch, here:
15
15
  # ExecStart = bundle exec --keep-file-descriptors unicorn -c ...
16
16
  ExecStart = /usr/bin/unicorn -c /path/to/unicorn.conf.rb /path/to/config.ru
17
+
18
+ # NonBlocking MUST be true if using socket activation with unicorn.
19
+ # Otherwise, there's a small window in-between when the non-blocking
20
+ # flag is set by us and our accept4 call where systemd can momentarily
21
+ # make the socket blocking, causing us to block on accept4:
22
+ NonBlocking = true
17
23
  Sockets = unicorn.socket
24
+
18
25
  KillSignal = SIGQUIT
19
26
  User = nobody
20
27
  Group = nogroup
@@ -1,6 +1,11 @@
1
1
  # -*- encoding: binary -*-
2
2
  require 'mkmf'
3
3
 
4
+ unless RUBY_VERSION < '3.1'
5
+ warn "Unicorn was only tested against MRI up to 3.0.\n" \
6
+ "It might not properly work with #{RUBY_VERSION}"
7
+ end
8
+
4
9
  have_macro("SIZEOF_OFF_T", "ruby.h") or check_sizeof("off_t", "sys/types.h")
5
10
  have_macro("SIZEOF_SIZE_T", "ruby.h") or check_sizeof("size_t", "sys/types.h")
6
11
  have_macro("SIZEOF_LONG", "ruby.h") or check_sizeof("long", "sys/types.h")