Date | Commit message (Collapse) |
|
|
|
|
|
|
|
This should just run inside RAILS_ROOT out-of-the-box. No
config.ru is needed (but we'll use one if it's detected).
This has slightly different semantics than script/server
and the normal "unicorn" script (which has "rackup"-like)
semantics. It tries to combine the best of both worlds,
but do not consider the command-line option interface
to be stable by any means.
|
|
Although I didn't like the idea initially, signal queueing
allows test_exec to run more reliably and the limited signal
queue size will prevent scary queued signal behavior.
Also, always wakeup the master immediately when CHLD is trapped
to reduce the performance impact of SIGHUP-based config
reloading. Combined with an extra check in test_exec, this
should make test_exec run much more reliably than before.
|
|
In nearly every app, if the current working directory
disappears, the app becomes broken, sometimes subtly. It can be
especially broken when preload_app is false (the default).
So just shut ourselves down to spare ourselves the
wasted CPU cycles on a dead app.
As a (hopefully) pleasant side effect, this allows
configurations with preload_app==false (the default) to do
application code reloads via SIGHUP (in addition to unicorn
config reloads).
|
|
Despite reading numerous articles and inspecting the 1.9.1-p0 C
source, I will never trust that we're always handling
encoding-aware IO objects correctly. Thus this new test uses
UNIX shell utilities that should always operate on files/sockets
on a byte-level.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
This is to be consistent with the existing "pid"
and std{err,out}_path options which also take
paths relative to "~"
|
|
Some other frameworks may also have code reloading issues.
Since code reloading is mainly for development mode and Unicorn
is capable of replacing the running executable without any
dropping connections, broken code reloaders aren't worth
fixing from our code...
|
|
Or lack thereof on POSIX.
|
|
Just in case this stupid Ruby 1.9-ism creeps up on someone; I
haven't been able to reproduce I/O corruption from the test
cases, but better safe than sorry here.
|
|
There's no point in increasing method visibility since
it can cause conflicts with other libraries and reduces
the inlining opportunities the compiler can make.
|
|
|
|
|
|
It is no longer relevant (or working) with rackup compatibility.
|
|
This allows config.ru files to be shared by rackup and
unicorn without errors.
|
|
Reformat README to avoid preformatted text.
Document signal handling in SIGNALS.
Split out DESIGN, it's probably not as useful to end-users
Update CONTRIBUTORS
LICENSE: copyright is for me (Eric Wong), not Zed since this
is a Mongrel fork.
|
|
|
|
Hopefully this increases test reliability
|
|
This reverts commit 4414d9bf34f162a604d2aacc765ab1ca2fc90404.
|
|
This reverts commit e66ab79b8b5bc5311c750bf03868a7b2574f4ea1.
Conflicts:
bin/unicorn
|
|
|
|
The LICENSE file is pretty much the same text, so there's no
point in having both files other than making the licensing terms
ambiguous. COPYING only specifies "GPL" while LICENSE specifies
"GPL2" specifically.
|
|
Echoe/Rake seems to be loading the wrong version, tired
of fighting it and figuring out what it's doing...
|
|
|
|
This is useful for freeing certain resources you
do NOT want passed to child processes.
|
|
Unicorn will always continue to run in the directory it started
in, it does not chdir to "/". Since the default start_ctx[:cwd]
is symlink-aware, this should not be a problem for
Capistrano-deployed applications.
|
|
This is a followup to 11172f9bdcc7c57c9ae857a8088e49527a953fa1
|
|
The $stderr/$stdout objects need to point to +File+ objects
and mot just +IO+ objects they default to for reopen_logs
to work.
|
|
Also, update the Manifest
|
|
There used to be a log rotation lambda in there, but
that got moved to lib/unicorn/util.rb for convenience.
|
|
The config file format changed from add_listener => listen.
|
|
This allows LOAD_PATH modifications via the command-line
(via -I or -rubygems on the command-line).
|
|
Instead of blindly trying to bind to the default listener
(which is already the default as specified by Configurator).
|
|
|
|
|
|
As opposed to doing this in the shell, this allows the files to
be reopened reliably after rotation.
While we're at it, use $stderr/$stdout instead of STDERR/STDOUT
since they seem to be more favored.
|
|
This means processes will share less memory but things
should be compatible with all existing setups.
|
|
|
|
If we get woken up during an IO.select, just make a bet that we
spent some time doing something else and aggressively try to
accept new connections without trying to wait for I/O-readiness
notification.
|
|
I consider it a sensible default for long-running servers.
Additionally, there is no easy way to make USR1 rotate the
master process log without this.
|
|
Since I use it myself and also in the tests, we
might as well implement it correctly as a class method
so people can run it in their trap('USR2') hooks.
|
|
Using `/bin/sh -c pwd` here instead of Dir.pwd since
the pwd shell builtin is symlink-aware if ENV['PWD']
is correct (and it is when launched via Cap).
Also, correctly use @directory if it is set.
|
|
Relying on at_exit can still means a child might get it
if there's any race condition....
|
|
Probably not a real bug, but test_exec has been experiencing
mysterious failures....
|
|
Some applications do not handle loading before forking
out-of-the-box very gracefully, this starts adding support
to build the Rack(-ish) application later in the process.
|
|
Oops, that was making debugging tests quite difficult.
|
|
Doesn't seem to make a difference for 1.8
but shows up in 1.9...
|
|
It's confusing with the lowercase "-p" option which is more
common for developers to use. PID files are only needed for
production deployments, and those should be using config files
anyways.
|
|
Yeah, some of my test machines are ridiculously slow...
|