Date | Commit message (Collapse) |
|
A single Unicorn instance may manage more than 1024 workers
without needing privileges to modify resource limits. As a
result of this, the "raindrops"[1] gem/library is now a required
dependency.
TCP socket defaults now favor low latency to mimic UNIX domain
socket behavior (tcp_nodelay: true, tcp_nopush: false). This
hurts throughput, users who want to favor throughput should
specify "tcp_nodelay: false, tcp_nopush: true" in the listen
directive.
Error logging is more consistent and all lines should be
formatted correctly in backtraces. This may break the
behavior of some log parsers.
The call stack is smaller and thus easier to examine backtraces
when debugging Rack applications.
There are some internal API changes and cleanups, but none that
affect applications designed for Rack. See "git log v3.7.0.."
for details.
For users who cannot install kgio[2] or raindrops, Unicorn 1.1.x
remains supported indefinitely. Unicorn 3.x will remain
supported if there is demand. We expect raindrops to introduce
fewer portability problems than kgio did, however.
[1] http://raindrops.bogomips.org/
[2] http://bogomips.org/kgio/
|
|
It's still O(n) since we don't maintain a reverse mapping of
spawned processes, but at least we avoid the extra overhead of
creating an array every time.
|
|
Some applications/libraries may launch background threads which
can lock up the process. So we can't disable heartbeat checking
just because the main thread is sleeping. This also has the
side effect of reducing master process wakeups when all workers
are idle.
|
|
We'll continue to support older versions, but make
sure things on the latest ones work.
|
|
This matches the latest Rack behavior.
We can't just use Rack::Builder.parse_file because our option
parser logic is slightly different and incompatible.
ref: rack commit d31cf2b7c0c77c04510c08d95776315ceb24ba54
|
|
We don't want the Worker#tick= assignment to trigger after we
accept a client, since we'd drop that request when we raise the
exception that breaks us out of the worker loop.
Also, we don't want to enter IO.select with an empty LISTENERS
array so we can fail with IOError or Errno::EBADF.
|
|
A leftover from the fchmod() days
|
|
Oops, I suck at Ruby :x
|
|
We can do it!
|
|
The random garbage generator may occasionally generate URIs that
are too long and cause the URI-specific error to be raised
instead of the generic parser error we recently introduced.
Follow-up-to: commit 742c4d77f179a757dbcb1fa350f9d75b757acfc7
|
|
Backtraces are now formatted properly (with timestamps) and
exceptions will be logged more consistently and similar to
Logger defaults:
"#{exc.message} (#{e.class})"
backtrace.each { |line| ... }
This may break some existing monitoring scripts, but errors
will be more standardized and easier to check moving forward.
|
|
"app error" is more correct, and consistent with Rainbows!
|
|
rescuing from SystemExit and exit()-ing again is ugly, but
changes made to lower stack depth positively affect _everyone_
so we'll tolerate some ugliness here.
We'll need to disable graceful exit for some tests, too...
|
|
This means we no longer waste an extra file descriptor per
worker process in the master. Now there's no need to set a
higher file descriptor limit for systems running >= 1024
workers.
|
|
Just in case we break anything
|
|
There's absolutely no need to keep the OptionParser around in
worker processes.
|
|
The random garbage generator may occasionally generate URIs that
are too long and cause the URI-specific error to be raised
instead of the generic parser error we recently introduced.
Follow-up-to: commit 742c4d77f179a757dbcb1fa350f9d75b757acfc7
|
|
We always know we have zero workers at startup, so we don't
need to check before hand. SIGHUP users may suffer a small
performance decrease as a result, but there's not much we
can do about it.
|
|
This should be easier to understand and reduces garbage on
stack, too.
|
|
It may return the previous second
|
|
kgio never does reverse lookup
|
|
Not all invocations of filter_body will trigger CoW on the
given destination string. We can also avoid an unnecessary
rb_str_set_len() in the non-chunked path, too.
|
|
Needless line noise, kgio doesn't support tainting anyways.
|
|
Ruby IO.select never raises that, actually
|
|
The random garbage generator may occasionally generate URIs that
are too long and cause the URI-specific error to be raised
instead of the generic parser error we recently introduced.
|
|
By avoid Array#each
|
|
ivar references using @ are slightly faster than calling
attribute methods.
|
|
Oops, it messes logging up badly.
|
|
chunk_ready! was my original name for it, but I'm indecisive
when it comes to naming things.
|
|
This allows one to enter the dechunker without parsing
HTTP headers beforehand. Since we skipped header parsing,
trailer parsing is not supported since we don't know
what trailers might be (to our knowledge, nobody uses trailers
anyways)
|
|
copy-on-write behavior doesn't help you if your common
use case triggers copies.
|
|
Makes things easier-to-understand since it's based on memcpy()
|
|
These TCP settings are a closer match to the behavior of
Unix domain sockets and what users expect for fast streaming
responses even if nginx can't provide them just now...
|
|
kgio 2.4.1 portability should be better than 2.3, so
less user confusion and push them towards 2.4
|
|
This reduces the size of `caller` by 5 frames,
which should make backtraces easier-to-read, raising
exceptions less expensive, and reduce GC runtime.
|
|
Stack depth affects Ruby GC performance, so lowering it
makes sense
|
|
* miscellaneous documentation improvements
* return 414 (instead of 400) for Request-URI Too Long
* strip leading and trailing linear whitespace in header values
User-visible improvements meant for Rainbows! users:
* add :ipv6only "listen" option (same as nginx)
|
|
Enabling this flag for an IPv6 TCP listener allows users to
specify IPv6-only listeners regardless of the OS default.
This should be interest to Rainbows! users.
|
|
Original patch by Hongli Lai <hongli@phusion.nl>:
> >From bfefc2cf0efb0913a42862886363b3140dcdbb2a Mon Sep 17 00:00:00 2001
> From: Hongli Lai (Phusion) <hongli@phusion.nl>
> Date: Mon, 6 Jun 2011 13:39:00 +0200
> Subject: [PATCH] Ensure that 'make gem' builds the documentation too.
>
> If autogenerated documentation files, like man pages, don't exist then
> 'make gem' will fail, complaining that some files are not found. By
> depending the 'gem' target on the 'doc' target we ensure that 'make gem'
> always works.
>
> Signed-off-by: Hongli Lai (Phusion) <hongli@phusion.nl>
ref: http://mid.gmane.org/4DED0EE2.7040400@phusion.nl
|
|
Oops.
|
|
IPv4-mapped-IPv6 addresses are fugly.
|
|
pandoc 1.8 no longer has this.
|
|
Signed-off-by: Hongli Lai (Phusion) <hongli@phusion.nl>
|
|
Rails 3.0.0 can't use Rake 0.9.0 it seems.
|
|
It's required for RubyGems 1.8.x
|
|
Ruby 1.9.3dev (trunk) requires it if the string size
is unchanged.
|
|
RFC 2616, section 4.2:
> The field-content does not include any leading or trailing LWS:
> linear white space occurring before the first non-whitespace
> character of the field-value or after the last non-whitespace
> character of the field-value. Such leading or trailing LWS MAY be
> removed without changing the semantics of the field value. Any LWS
> that occurs between field-content MAY be replaced with a single SP
> before interpreting the field value or forwarding the message
> downstream.
|
|
Older announcements on our mailing list could be harder
to find.
|
|
Otherwise it could casefold and we don't want that.
|
|
No need to list things inside preformatted text
|