Release Name: 2.0.0
Notes:
Unicorn is an HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels. Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between Unicorn and slow clients.
* http://unicorn.bogomips.org/
* mongrel-unicorn@rubyforge.org
* git://git.bogomips.org/unicorn.git
Changes:
Despite the version number, this release mostly features
internal cleanups for future versions of Rainbows!. User
visible changes include reductions in CPU wakeups on idle sites
using high timeouts.
Barring possible portability issues due to the introduction of
the kgio library, this release should be ready for all to use.
However, 1.1.x (and possibly 1.0.x) will continue to be
maintained. Unicorn 1.1.5 and 1.0.2 have also been released
with bugfixes found during development of 2.0.0.
Changes:
GIT-VERSION-GEN | 2 +-
GNUmakefile | 14 +-
Rakefile | 29 +-
TODO | 7 +
bin/unicorn | 26 +-
bin/unicorn_rails | 26 +-
examples/unicorn.conf.rb | 5 +-
ext/unicorn_http/ext_help.h | 4 -
ext/unicorn_http/global_variables.h | 4 +-
ext/unicorn_http/unicorn_http.rl | 184 +++--
lib/unicorn.rb | 886 ++-------------------
lib/unicorn/app/exec_cgi.rb | 4 +-
lib/unicorn/configurator.rb | 31 +-
lib/unicorn/const.rb | 51 +-
lib/unicorn/http_request.rb | 112 ++--
lib/unicorn/http_response.rb | 50 +-
lib/unicorn/http_server.rb | 695 ++++++++++++++++
lib/unicorn/launcher.rb | 7 +-
lib/unicorn/preread_input.rb | 30 +
lib/unicorn/socket_helper.rb | 8 +-
lib/unicorn/tee_input.rb | 126 ++--
lib/unicorn/tmpio.rb | 29 +
lib/unicorn/util.rb | 136 ++--
lib/unicorn/worker.rb | 40 +
local.mk.sample | 9 -
script/isolate_for_tests | 45 +
t/GNUmakefile | 8 +-
t/preread_input.ru | 17 +
t/t0003-working_directory.sh | 5 -
t/t0010-reap-logging.sh | 55 ++
t/t0303-rails3-alt-working_directory_config.ru.sh | 5 -
t/t9000-preread-input.sh | 48 ++
t/test-rails3.sh | 2 +-
test/exec/test_exec.rb | 2 +-
test/unit/test_http_parser_ng.rb | 38 +
test/unit/test_request.rb | 12 +
test/unit/test_response.rb | 23 +-
test/unit/test_signals.rb | 2 +-
test/unit/test_tee_input.rb | 39 +-
unicorn.gemspec | 1 +
40 files changed, 1519 insertions(+), 1298 deletions(-)
commit 5ffc1f81c3f56d17ff3369f7514e978754840c29
Author: Eric Wong
Date: Wed Oct 27 23:32:24 2010 +0000
unicorn 2.0.0 - mostly internal cleanups
Despite the version number, this release mostly features
internal cleanups for future versions of Rainbows!. User
visible changes include reductions in CPU wakeups on idle sites
using high timeouts.
Barring possible portability issues due to the introduction of
the kgio library, this release should be ready for all to use.
However, 1.1.x (and possibly 1.0.x) will continue to be
maintained. Unicorn 1.1.5 and 1.0.2 have also been released
with bugfixes found during development of 2.0.0.
commit a3b08e9411f1d958e2264329c67972541424ac35
Merge: 0692e8c 7f3ebe9
Author: Eric Wong
Date: Wed Oct 27 23:31:41 2010 +0000
Merge branch '1.1.x-stable'
* 1.1.x-stable:
unicorn 1.1.5
doc: stop using deprecated rdoc CLI options
gemspec: depend on Isolate 3.0.0 for dev
configurator: reloading with unset values restores default
configurator: use "__send__" instead of "send"
Rakefile: capture prerelease tags
Rakefile: don't post freshmeat on empty changelogs
fix delays in signal handling
commit 0692e8cb10dd27275f2de794ed6eba62e9918431
Merge: 4d493d8 ea975cc
Author: Eric Wong
Date: Wed Oct 27 23:31:38 2010 +0000
Merge branch 'maint'
* maint:
unicorn 1.0.2
doc: stop using deprecated rdoc CLI options
gemspec: depend on Isolate 3.0.0 for dev
configurator: reloading with unset values restores default
configurator: use "__send__" instead of "send"
Rakefile: capture prerelease tags
Rakefile: don't post freshmeat on empty changelogs
fix delays in signal handling
SIGTTIN works after SIGWINCH
commit 4d493d8ad203d7f13ac56b7d6ba2b3aaa481cbd2
Author: Eric Wong
Date: Wed Oct 27 16:26:28 2010 -0700
examples/unicorn.conf: add a note about throttling signals
Sending the same signal faster than the receiver can process
means signals can get lost.
commit ea975cc3e6d2e6ac9c971c8cbda712486ec63c2a
Author: Eric Wong
Date: Wed Oct 27 23:11:09 2010 +0000
unicorn 1.0.2
This is the latest maintenance release of the 1.0.x series.
All users are encouraged to upgrade to 1.1.x stable series
and report bugs there.
Shortlog of changes since 1.0.1:
Eric Wong (8):
SIGTTIN works after SIGWINCH
fix delays in signal handling
Rakefile: don't post freshmeat on empty changelogs
Rakefile: capture prerelease tags
configurator: use "__send__" instead of "send"
configurator: reloading with unset values restores default
gemspec: depend on Isolate 3.0.0 for dev
doc: stop using deprecated rdoc CLI options
commit 856959cc0b2dbc96f115d26672d0f5b73ae79914
Author: Eric Wong
Date: Wed Oct 27 23:07:42 2010 +0000
doc: stop using deprecated rdoc CLI options
-N and -a switches no longer exist in rdoc 2.5
(cherry picked from commit 054c7df93db61839648925cfd881ae880709a210)
commit 04f0f44f9bd0907fcff1e2cdc59f7e84d4110539
Author: Eric Wong
Date: Wed Oct 27 23:08:51 2010 +0000
gemspec: depend on Isolate 3.0.0 for dev
No reason to not use the latest and greatest!
(cherry picked from commit 570a57c07fd8c3d24b7337637e0dd30136b3a11a)
Conflicts:
unicorn.gemspec
commit 054c7df93db61839648925cfd881ae880709a210
Author: Eric Wong
Date: Wed Oct 27 23:07:42 2010 +0000
doc: stop using deprecated rdoc CLI options
-N and -a switches no longer exist in rdoc 2.5
commit 570a57c07fd8c3d24b7337637e0dd30136b3a11a
Author: Eric Wong
Date: Wed Oct 27 23:06:45 2010 +0000
gemspec: depend on Isolate 3.0.0 for dev
No reason to not use the latest and greatest!
commit 2dd4a89d5726e13b962c1e287d84a6c30f5dd46c
Author: Eric Wong
Date: Wed Oct 27 13:51:12 2010 -0700
configurator: reloading with unset values restores default
If a configuration directive is set at startup and later
unset, it correctly restores the original default value
as if it had never been set in the first place.
This applies to the majority of the configuration values with
a few exceptions:
* This only applies to stderr_path and stdout_path when
daemonized (the usual case, they'll be redirected to
"/dev/null"). When NOT daemonized, we cannot easily redirect
back to the original stdout/stderr destinations.
* Unsetting working_directory does not restore the
original working directory where Unicorn was started.
As far as we can tell unsetting this after setting it is
rarely desirable and greatly increases the probability of
user error.
(cherry picked from commit 51b2b90284000aee8d79b37a5406173c45ae212d)
commit 5e672c48d8a3555e4a01f653fb2e0b3556087737
Author: Eric Wong
Date: Wed Oct 27 12:46:46 2010 -0700
configurator: use "__send__" instead of "send"
It's less ambiguous since this is a network server after all.
(cherry picked from commit f62c5850d7d17d7b5e301a494f8bdf5be3674411)
commit 51b2b90284000aee8d79b37a5406173c45ae212d
Author: Eric Wong
Date: Wed Oct 27 13:51:12 2010 -0700
configurator: reloading with unset values restores default
If a configuration directive is set at startup and later
unset, it correctly restores the original default value
as if it had never been set in the first place.
This applies to the majority of the configuration values with
a few exceptions:
* This only applies to stderr_path and stdout_path when
daemonized (the usual case, they'll be redirected to
"/dev/null"). When NOT daemonized, we cannot easily redirect
back to the original stdout/stderr destinations.
* Unsetting working_directory does not restore the
original working directory where Unicorn was started.
As far as we can tell unsetting this after setting it is
rarely desirable and greatly increases the probability of
user error.
commit f62c5850d7d17d7b5e301a494f8bdf5be3674411
Author: Eric Wong
Date: Wed Oct 27 12:46:46 2010 -0700
configurator: use "__send__" instead of "send"
It's less ambiguous since this is a network server after all.
commit 928a88d5419210380078a2e141cb64d308719295
Author: Eric Wong
Date: Wed Oct 6 01:27:45 2010 +0000
Rakefile: capture prerelease tags
Since we do those, now.
(cherry picked from commit 1d1a2b1bd5bdd89f774f19bf8ad24c2f5f8a2d4c)
commit 74dec350d93b88c0a5bd792239671097901e2393
Author: Eric Wong
Date: Wed Oct 27 19:32:55 2010 +0000
Rakefile: don't post freshmeat on empty changelogs
We don't want to flood or monopolize freshmeat.
(cherry picked from commit 1ad510d645e0c84c8d352ac0deaeefa75240ea94)
commit c7feb7e10a937df2dc72f53aa6cc1ebda4c1cd3b
Author: Eric Wong
Date: Wed Oct 27 12:43:14 2010 -0700
configurator: switch to normal class
No point in using a Struct for (1.8) space-efficiency
if there's only one of them.
commit 10037f2aabb3fab4296fc90c615e7caa9f4a9b53
Author: Eric Wong
Date: Wed Oct 27 01:44:33 2010 +0000
fix delays in signal handling
There is no need to loop in the master_sleep method at all, as
the rest of the code is designed to function even on interrupted
sleeps.
This change is included as part of a larger cleanup in master.
(commit bdc79712e5ac53d39c51e80dfe50aff950e5053f)
commit 514af94321ef0fab74894e517792c4a9709d76f5
Author: Eric Wong
Date: Wed Oct 27 00:36:25 2010 +0000
reduce master process wakeups
To reduce CPU wakeups and save power during off hours,
we can precalculate a safe amount to sleep before killing
off idle workers.
commit 7ef05ec23b06f06e9d4bb1cf45d1907b4eeacb80
Author: Eric Wong
Date: Tue Oct 26 23:19:09 2010 +0000
master: remove limit on queued signals
If a moronic sysadmin is sending too many signals, just let them
do it. It's likely something is terribly wrong when the server
is overloaded with signals, so don't try to protect users from
it. This will also help in case where TTOU signals are sent too
quickly during shutdown, although sleeping between kill(2)
syscalls is always a good idea because of how non-real-time
signals are delivered.
commit 2243c97edf80d635871bc678794f07d6c1d033c2
Author: Eric Wong
Date: Sat Oct 9 00:03:43 2010 +0000
unicorn 2.0.0pre3 - more small fixes
There is a new Unicorn::PrereadInput middleware to which allows
input bodies to be drained off the socket and buffered to disk
(or memory) before dispatching the application.
HTTP Pipelining behavior is fixed for Rainbows! There
are some small Kgio fixes and updates for Rainbows!
users as well.
commit 6eb46e422f4b2ba98c795fca5e18e7262c0c688e
Author: Eric Wong
Date: Fri Oct 8 23:44:23 2010 +0000
add PrereadInput middleware to get around TeeInput
This may be useful for some apps that wish to drain the body
before acquiring an app-wide lock. Maybe it's more useful
with Rainbows!...
commit 9be78606355d4a0ad4ea59316ab2ce998c5b9a12
Author: Eric Wong
Date: Fri Oct 8 22:58:59 2010 +0000
bump kgio dependency
kgio 1.3.1 fixes some cases for zero-length reads.
commit f20274e84169e18a73a5cd341b6bc31b625b83ce
Author: Eric Wong
Date: Fri Oct 8 08:49:22 2010 +0000
build: automatically call isolate on updates
Automation is nice, the makefile needs some cleanup
commit 861481436b933bf4b8d647c43191c701651f16e4
Author: Eric Wong
Date: Fri Oct 8 01:34:37 2010 -0700
bump kgio dependency to 1.3.0
There was a backwards-incompatible API change,
but that didn't even affect us.
commit c9950692f44bd91af089794664dc56a446668004
Author: Eric Wong
Date: Thu Oct 7 18:42:15 2010 -0700
gemspec: bump kgio version
kgio 1.2.1 works around a bug for some *BSDs, some of which are
popular platforms for developers.
commit e99178ef89eca9e46b73484aaf9733259dac9dca
Author: Eric Wong
Date: Thu Oct 7 08:12:36 2010 +0000
http: fix behavior with pipelined requests
We cannot clear the buffer between requests because
clients may send multiple requests that get taken in
one read()/recv() call.
commit eb5ba488422020568e5ccf650891d7fccce7238f
Author: Eric Wong
Date: Thu Oct 7 07:22:58 2010 +0000
unicorn 2.0.0pre2 - releases are cheap
Internal changes/cleanups for Rainbows!
commit 4c48b520786807487f7f76d709b0dbcee63c4d0c
Author: Eric Wong
Date: Thu Oct 7 06:59:05 2010 +0000
http: remove unnecessary rb_str_update() calls
Rubinius no longer uses it, and it conflicts with a public
method in MRI.
commit 8daf254356241c135ad2c843de567910528a10a7
Author: Eric Wong
Date: Thu Oct 7 06:55:22 2010 +0000
start using more compact parser API
This should be easier for Rainbows! to use
commit 090f56bb79a8ec734719d9be90daa3cd01d29871
Author: Eric Wong
Date: Thu Oct 7 06:33:03 2010 +0000
http_server: avoid method redefinition warnings
We clobber the accessor methods.
commit 5df8f15c32420c03b2e763a649e6d829ede52113
Author: Eric Wong
Date: Thu Oct 7 05:32:38 2010 +0000
http: allow this to be used as a request object
The parser and request object become one and the
same, since the parser lives for the lifetime
of the request.
commit 629107d749748f661ddb73f146ab35836874cc9e
Author: Eric Wong
Date: Wed Oct 6 17:16:49 2010 -0700
bin/unicorn: show "RACK_ENV" in --help
It's more descriptive as to what environment we're setting
than "ENVIRONMENT".
commit 1d1a2b1bd5bdd89f774f19bf8ad24c2f5f8a2d4c
Author: Eric Wong
Date: Wed Oct 6 01:27:45 2010 +0000
Raiefile: capture prerelease tags
Since we do those, now.
commit cb48b1bc7231db7f53bec6e88e696dc53153750d
Author: Eric Wong
Date: Wed Oct 6 01:08:36 2010 +0000
unicorn 2.0.0pre1 - a boring "major" release
Mostly internal cleanups for future versions of Rainbows! and
people trying out Rubinius. There are tiny performance
improvements for Ruby 1.9.2 users which may only be noticeable
with Rainbows!
Unicorn 1.1.x users are NOT required to upgrade.
commit 4c59a4861bf3f8d25335696c1f8cbce3cd5db902
Author: Eric Wong
Date: Wed Oct 6 01:07:49 2010 +0000
gemspec: depend on newer isolate
We use the latest and greatest whenever possible.
commit cb233696be73873f6f8c367f4b977ade1815b265
Author: Eric Wong
Date: Tue Oct 5 23:59:45 2010 +0000
various cleanups and reduce indentation
This also affects some constant scoping rules, but hopefully
makes things easier to follow. Accessing ivars (not via
accessor methods) are also slightly faster, so use them in
the criticial process_client code path.
commit d4c898a4adc6cb6c3a20a648ae6b9b6a226066a6
Author: Eric Wong
Date: Tue Oct 5 23:34:39 2010 +0000
upgrade to kgio 1.2.0
This provides the kgio_read! method which is like readpartial,
only significantly cheaper when a client disconnects on us.
commit 80f9987581014d694b8eb67bba0d5c408b7d0f98
Author: Eric Wong
Date: Tue Oct 5 23:34:19 2010 +0000
GNUmakefile: fix isolate invocation
again :x
commit fd6b47cf1690cb45f2144cd92e0fe1f301c7c37b
Author: Eric Wong
Date: Tue Oct 5 22:09:20 2010 +0000
tee_input: use kgio to avoid stack traces on EOF
TeeInput methods may be invoked deep in the stack, so
avoid giving them more work to do if a client disconnects
due to a bad upload.
commit 350e8fa3a94838bcc936782315b3472615fe6517
Author: Eric Wong
Date: Tue Oct 5 22:01:19 2010 +0000
http: raise empty backtrace for HttpParserError
It's expensive to generate a backtrace and this exception
is only triggered by bad clients. So make it harder for
them to DoS us by sending bad requests.
commit c2975b85b9378797631d3ab133cac371f9fadf54
Author: Eric Wong
Date: Tue Oct 5 21:38:47 2010 +0000
tests: do not invoke isolate in test install dest
We don't want to waste time and bandwidth.
commit ec1315c9e9175d755dfd7b4acb8398fa7c7a924e
Author: Eric Wong
Date: Tue Oct 5 21:29:51 2010 +0000
test_tee_input: use a socketpair()
It's a much closer representation of what we'd expect in
the real server than a mono-directional UNIX pipe.
commit c639eef6b9c8d793c7f72fa5ac03adb5cf4d1e14
Author: Eric Wong
Date: Tue Oct 5 19:22:09 2010 +0000
test_signals: enable test under Rubinius
The bugs from signal handling were fixed in the Rubinius
1.1.0 release.
commit 72dee9e4a8234af762b058a38132268d202c17bf
Author: Eric Wong
Date: Tue Oct 5 19:20:39 2010 +0000
tmpio: use super instead of an explicit method
This is for compatibility with Ruby implementations such as
Rubinius that use "IO.new" internally inside "IO.open"
commit 7ca92025ececb4b71ec4420e03d5725f13c39cc4
Author: Eric Wong
Date: Tue Oct 5 18:48:53 2010 +0000
update comment about non-blocking accept()
Thanks to kgio, we no longer use accept_nonblock.
commit fc820598da30509269ec84eeca598085ca296e38
Author: Eric Wong
Date: Tue Oct 5 08:00:34 2010 +0000
util: uindent use less ambiguous constant scoping
This hopefully makes things easier to read and follow.
commit 3d147e9bcd8f99c94900a00181692c2a09c3c3c9
Author: Eric Wong
Date: Tue Oct 5 07:54:13 2010 +0000
Unicorn::Util.tmpio => Unicorn::TmpIO.new
This is slightly shorter and hopefully easier to find.
commit e184b9d0fb45b31d80645475e22f0bbbecd195f9
Author: Eric Wong
Date: Tue Oct 5 01:27:00 2010 +0000
doc: update TODO
This gives us some things to think about.
commit 29946368c45dce5da116adb426362ee93c507c4e
Author: Eric Wong
Date: Tue Oct 5 00:13:02 2010 +0000
start using kgio, the kinder, gentler I/O library
This should hopefully make the non-blocking accept()
situation more tolerable under Ruby 1.9.2.
commit 9ef6b6f551a34922cfd831e2521495e89afe2f94
Author: Eric Wong
Date: Mon Oct 4 23:55:31 2010 +0000
split out isolate usage/logic
We'll be using more of Isolate in development.
commit 018a9deff4bd9273e053f369d746256e5b3ac99b
Author: Eric Wong
Date: Mon Oct 4 21:06:41 2010 +0000
http_request: reformat and small reorg
This hides more HTTP request logic inside our object.
commit dfc5f5a5e4aec4578b79de68c91906da75472a5a
Author: Eric Wong
Date: Wed Sep 29 23:57:57 2010 -0700
tee_input: update interface to use HttpRequest
This should ensure we have less typing to do.
commit fe94d80cb37ee441762ad2a8f5c25092f8eb57a8
Author: Eric Wong
Date: Mon Sep 27 22:39:02 2010 -0700
http_request: avoid globals
Rainbows! will be able to reuse this.
commit 5b6a97ff54d029d433b79eee1549e6f99464c48b
Author: Eric Wong
Date: Fri Aug 27 21:45:33 2010 +0000
split out worker to a separate file
This hopefully makes things easier to read, follow, and find
since it's mostly documentation...
commit 50c11036dd4898ccfed8b3e0552e88c67b6c63a9
Author: Eric Wong
Date: Fri Aug 27 20:29:55 2010 +0000
http_response: avoid singleton method
There's no need for a response class or object since Rack just
uses an array as the response. So use a procedural style which
allows for easier understanding.
We shall also support keepalive/pipelining in the future, too.
commit 7a3efe8a03f85c1f2957130986c24ef7931ff44a
Merge: 1a2363b 6151686
Author: Eric Wong
Date: Mon Oct 4 20:34:29 2010 +0000
Merge commit 'v1.1.4'
* commit 'v1.1.4':
unicorn 1.1.4 - small bug fix and doc updates
update Rails 3 tests to use Rails 3 final
avoid unlinking actively listening sockets
doc: update HACKING for documentation contributions
doc: update Sandbox document for Bundler
TUNING: more on socket buffer sizes
commit 1a2363b17b1d06be6b35d347ebcaed6a0c940200
Author: Eric Wong
Date: Mon Oct 4 04:17:31 2010 +0000
avoid unlinking actively listening sockets
While we've always unlinked dead sockets from nuked/leftover
processes, blindly unlinking them can cause unnecessary failures
when an active process is already listening on them. We now
make a simple connect(2) check to ensure the socket is not in
use before unlinking it.
Thanks to Jordan Ritter for the detailed bug report leading to
this fix.
ref: http://mid.gmane.org/8D95A44B-A098-43BE-B532-7D74BD957F31@darkridge.com
commit 505a9e72d320fe3ae521ceb0f381c1c0f5ae4389
Author: Eric Wong
Date: Wed Sep 15 14:57:27 2010 -0700
doc: update HACKING for documentation contributions
We switched to RDoc 2.5.x long ago and this should clarify
some documentation preferences I have.
commit 1a75966a5d1a1f6307ed3386e2f91a28bbb72ca0
Author: Eric Wong
Date: Wed Sep 15 14:42:54 2010 -0700
doc: update Sandbox document for Bundler
Thanks to Lawrence Pit, Jamie Wilkinson, and Eirik Dentz Sinclair.
ref: mid.gmane.org/4C8986DA.7090603@gmail.com
ref: mid.gmane.org/5F1A02DB-CBDA-4302-9E26-8050C2D72433@efficiency20.com
commit f9a7a19a361fd674bab4e2df7e0897015528bba7
Author: Eric Wong
Date: Mon Aug 30 23:25:59 2010 -0700
TUNING: more on socket buffer sizes
Large buffers can hurt as well as help. And the difference
in real apps that do a lot of things other than I/O often
makes it not worth it.
commit da272fc48ffaa808456fe94dd7a3e01bc9799832
Author: Eric Wong
Date: Mon Aug 30 08:11:44 2010 +0000
update Rails 3 tests to use Rails 3 final
Rails 3 is out, and requires no code changes on our end to work
(as far as our tests show :)
commit 0aaa0afa49a2953b7c26c1596a284621e23d5fc4
Author: Eric Wong
Date: Mon Aug 30 07:59:01 2010 +0000
remove nasty ugly hacks at startup
These nasty hacks were breaking Rubinius compatibility.
This can be further cleaned up, too.
commit f3e1653b900596e054297675becd01d9985ad482
Merge: feab35f d634b06
Author: Eric Wong
Date: Sun Aug 29 23:38:13 2010 +0000
Merge branch '1.1.x-stable'
* 1.1.x-stable:
unicorn 1.1.3 - small bug fixes
make log reopens even more robust in threaded apps
update Rails3 tests to use 3.0.0rc2
make log reopens more robust in multithreaded apps
bin/*: more consistent --help output
SIGTTIN works after SIGWINCH
commit feab35fe531843066db3418598874cf9f9419614
Author: Eric Wong
Date: Sat Aug 28 18:52:48 2010 +0000
make log reopens even more robust in threaded apps
A follow-up to 4b23693b9082a84433a9e6c1f358b58420176b27
If multithreaded programming can be compared to juggling
chainsaws, then multithreaded programming with signal handlers
in play is akin to juggling chainsaws on a tightrope
over shark-infested waters.
commit 18968f6aff2fa5ba5a7e3e3d47c9cc05cd6c260d
Author: Eric Wong
Date: Sat Aug 28 07:07:14 2010 +0000
update Rails3 tests to use 3.0.0rc2
No code changes needed, thankfully.
commit 4b23693b9082a84433a9e6c1f358b58420176b27
Author: Eric Wong
Date: Sat Aug 28 05:30:46 2010 +0000
make log reopens more robust in multithreaded apps
IOError may occur due to race conditions as another thread
may close the file immediately after we call File#closed?
to check.
Errno::EBADF may occur in some applications that close a file
descriptor without notifying Ruby (or if two IO objects refer to
the same descriptor, possibly one of them using IO#for_fd).
commit 096afc1a8e958cc09b4ce8b3bfe76ce056c7ed69
Author: Eric Wong
Date: Tue Aug 24 06:21:00 2010 +0000
bin/*: more consistent --help output
This fixes a long-standing bug in the output of "unicorn_rails"
where the program name was missing.
commit bdc79712e5ac53d39c51e80dfe50aff950e5053f
Author: Eric Wong
Date: Sat Aug 7 03:27:50 2010 +0000
miscellaneous loop and begin cleanups
These are minor changes to remove unnecessary loop nesting and
begin usage to reduce our code size and hopefully simplify
flow for readers.
commit e4d0b226391948ef433f1d0135814315e4c48535
Author: Eric Wong
Date: Sat Aug 7 04:25:51 2010 +0000
log ERROR messages if workers exit with failure
Something is wrong if workers exit with a non-zero status,
so we'll increase the log level to help prevent people
from missing it.
commit f1d33c80dd6c5650f960f7087f4e08f809754d34
Author: Eric Wong
Date: Fri Jul 16 08:25:32 2010 +0000
SIGTTIN works after SIGWINCH
In addition to SIGHUP, it should be possible to gradually bring
workers back up (to avoid overloading the machine) when rolling
back upgrades after SIGWINCH.
Noticed-by: Lawrence Pit
ref: http://mid.gmane.org/4C3F8C9F.2090903@gmail.com
commit 5a0506c2affd2f5abe6e7315121e67aa3e32b253
Author: Eric Wong
Date: Fri Jul 16 08:25:32 2010 +0000
SIGTTIN works after SIGWINCH
In addition to SIGHUP, it should be possible to gradually bring
workers back up (to avoid overloading the machine) when rolling
back upgrades after SIGWINCH.
Noticed-by: Lawrence Pit
ref: http://mid.gmane.org/4C3F8C9F.2090903@gmail.com
(cherry picked from commit e75ee7615f9875db314a6403964e7b69a68b0521)
commit 78ba3899eb24d6893e34984b9f1c479c7e6c9be3
Merge: c13bec3 d1818d2
Author: Eric Wong
Date: Tue Jul 13 13:04:53 2010 -0700
Merge branch '1.1.x-stable'
* 1.1.x-stable: (27 commits)
unicorn 1.1.2 - fixing upgrade rollbacks
unicorn 1.0.1 - bugfixes only
SIGHUP deals w/ dual master pid path scenario
launcher: do not re-daemonize when USR2 upgrading
SIGHUP deals w/ dual master pid path scenario
launcher: do not re-daemonize when USR2 upgrading
unicorn 1.1.1 - fixing cleanups gone bad :x
tee_input: fix constant resolution for client EOF
unicorn 1.1.0 - small changes and cleanups
cleanup "stringio" require
tee_input: safer record separator ($/) handling
prefer "[]" to "first"/"last" where possible
tee_input: safer record separator ($/) handling
socket_helper: disable documentation
socket_helper: cleanup FreeBSD accf_* detection
socket_helper: no reason to check for logger method
configurator: cleanup RDoc, un-indent
configurator: documentation for new accept options
socket_helper: move defaults to the DEFAULTS constant
doc: recommend absolute paths for -c/--config-file
...
commit c13bec3449396b21795966101367838161612d61
Author: Eric Wong
Date: Tue Jul 13 08:57:37 2010 +0000
SIGHUP deals w/ dual master pid path scenario
As described in our SIGNALS documentation, sending SIGHUP to the
old master (to respawn SIGWINCH-ed children) while the new
master (spawned from SIGUSR2) is active is useful for backing
out of an upgrade before sending SIGQUIT to the new master.
Unfortunately, the SIGHUP signal to the old master will cause
the ".oldbin" pid file to be reset to the non-".oldbin" version
and thus attempt to clobber the pid file in use by the
to-be-terminated new master process.
Thanks to the previous commit to prevent redaemonization in the
new master, the old master can reliably detect if the new master
is active while it is reloading the config file.
Thanks to Lawrence Pit for discovering this bug.
ref: http://mid.gmane.org/4C3BEACF.7040301@gmail.com
commit 3f0f9d6d72cf17b34c130b86eb933bbc513b24b3
Author: Eric Wong
Date: Tue Jul 13 08:53:48 2010 +0000
launcher: do not re-daemonize when USR2 upgrading
This was accidentally enabled when ready_pipe was developed.
While re-daemonizing appears harmless in most cases this makes
detecting backed-out upgrades from the original master process
impossible.
commit ac15513bb81a345cd12c67702a81a585b8b0514e
Author: Eric Wong
Date: Sun Jul 11 02:05:01 2010 +0000
tee_input: fix constant resolution for client EOF
Noticed while hacking on a Zbatery-using application
commit 0fea004ab093ec4f59d919915a505a136326bd8a
Author: Eric Wong
Date: Thu Jul 8 05:54:25 2010 +0000
cleanup "stringio" require
"stringio" is part of the Ruby distro and we use it in multiple
places, so avoid re-requiring it.
commit 5ece8c1c33f10e6496dfe5ae1d0d368293278d2d
Author: Eric Wong
Date: Thu Jul 8 05:33:49 2010 +0000
prefer "[]" to "first"/"last" where possible
"[]" is slightly faster under Ruby 1.9 (but slightly
slower under 1.8).
commit 1cd698f8c7938b1f19e9ba091708cb4515187939
Author: Eric Wong
Date: Thu Jul 8 05:14:55 2010 +0000
tee_input: safer record separator ($/) handling
Different threads may change $/ during execution, so cache it at
function entry to a local variable for safety. $/ may also be
of a non-binary encoding, so rely on Rack::Utils.bytesize to
portably capture the correct size.
Our string slicing is always safe from 1.9 encoding: both our
socket and backing temporary file are opened in binary mode,
so we'll always be dealing with binary strings in this class
(in accordance to the Rack spec).
commit 98c51edf8b6f031a655a93b52808c9f9b78fb6fa
Author: Eric Wong
Date: Tue Jul 6 14:17:02 2010 -0700
socket_helper: disable documentation for internals
commit 2b4b15cf513f66dc7a5aabaae4491c17895c288c
Author: Eric Wong
Date: Tue Jul 6 12:59:45 2010 -0700
socket_helper: cleanup FreeBSD accf_* detection
Instead of detecting at startup if filters may be used, just try
anyways and log the error. It is better to ask for forgiveness
than permission :)
commit e0ea1e1548a807d152c0ffc175915e98addfe1f2
Author: Eric Wong
Date: Tue Jul 6 12:51:24 2010 -0700
socket_helper: no reason to check for logger method
We only use this module in HttpServer and our unit test mocks
it properly.
commit e4d2c7c302e96ee504d82376885ac6b1897c666a
Author: Eric Wong
Date: Tue Jul 6 12:49:48 2010 -0700
configurator: cleanup RDoc, un-indent
No point in redeclaring the Unicorn module in here.
commit 686281a90a9b47bac4dfd32a72a97e6e8d26afa1
Author: Eric Wong
Date: Tue Jul 6 12:39:36 2010 -0700
configurator: documentation for new accept options
The defaults should be reasonable, but there may be
folks who want to experiment.
commit ef8f888ba1bacc759156f7336d39ba9b947e3f9d
Author: Eric Wong
Date: Tue Jul 6 12:35:45 2010 -0700
socket_helper: move defaults to the DEFAULTS constant
This is to allow Rainbows! to override the defaults.
commit d7695c25c5e3b1c90e63bf15a5c5fdf68bfd0c34
Author: Eric Wong
Date: Mon Jul 5 23:14:40 2010 +0000
doc: recommend absolute paths for -c/--config-file
Suggested-by: Jeremy Evans
ref: http://mid.gmane.org/AANLkTintT4vHGEdueuG45_RwJqFCToHi5pm2-WKDSUMz@mail.gmail.com
commit 646cc762cc9297510102fc094f3af8a5a9e296c7
Author: Eric Wong
Date: Sat Jul 3 09:30:57 2010 +0000
socket_helper: tunables for tcp_defer_accept/accept_filter
Under Linux, this allows users to tune the time (in seconds) to
defer connections before allowing them to be accepted. The
behavior of TCP_DEFER_ACCEPT changed with Linux 2.6.32 and idle
connections may still be accept()-ed after the specified value
in seconds. A small value of '1' remains the default for
Unicorn as Unicorn does not worry about slow clients. Higher
values provide better DoS protection for Rainbows! but also
increases kernel memory usage.
Allowing "dataready" for FreeBSD accept filters will allow
SSL sockets to be used in the future for HTTPS, too.
commit 5769f313793ca84100f089b1911f2e22d0a31e9d
Author: Eric Wong
Date: Mon Jun 28 04:45:16 2010 +0000
http_response: this should be a module, not a class
This affects Rainbows!, but Rainbows! is still using the Unicorn
1.x branch. While we're at it, avoid redeclaring the "Unicorn"
module, it makes documentation noisier.
commit cf63db66bca9acfd3416ab8fc8a7fd4f07927342
Author: Eric Wong
Date: Fri Jun 25 11:29:13 2010 -0700
test-exec: prefer ENV['PWD'] in working_directory tests
We do an extra check in the application dispatch to ensure
ENV['PWD'] is set correctly to match Dir.pwd (even if the
string path is different) as this is required for Capistrano
deployments.
These tests should now pass under OSX where /var is apparently
a symlink to /private/var.
commit e2503a78150f4be113ee2a19404ba6aec401c696
Author: Eric Wong
Date: Thu Jun 24 05:47:27 2010 +0000
const: bump UNICORN_VERSION to 2.0.0pre
commit b8b979d75519be1c84818f32b83d85f8ec5f6072
Author: Eric Wong
Date: Thu Jun 24 04:31:37 2010 +0000
http: avoid (re-)declaring the Unicorn module
It makes for messy documentation.
commit 6f720afd95d8131a2657c643b97cb18c750ed9f8
Author: Eric Wong
Date: Thu Jun 24 04:24:34 2010 +0000
tee_input: undent, avoid (re)-declaring "module Unicorn"
It makes RDoc look better and cleaner, since we don't
do anything in the Unicorn namespace.
commit 9f48be69bfe579dab02b5fe8d6e728ae63fd24fc
Author: Eric Wong
Date: Thu Jun 24 04:11:35 2010 +0000
tee_input: allow tuning of client_body_buffer_size/io_size
Some folks may require more fine-grained control of buffering
and I/O chunk sizes, so we'll support them (unofficially, for
now).
commit 1a49a8295054a2e931f5288540acb858be8edcc8
Author: Eric Wong
Date: Thu Jun 24 03:54:40 2010 +0000
tee_input: (nitpick) use IO#rewind instead of IO#seek(0)
no need to pass an extra argument
|