Date | Commit message (Collapse) |
|
The daemonization logic between unicorn and unicorn_rails
scripts can definitely be shared.
Again: our daemonization logic is slightly non-standard since
our executables are designed to run in APP_ROOT/RAILS_ROOT and
not "/" like "normal" UNIX daemons.
|
|
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.
|
|
This allows config.ru files to be shared by rackup and
unicorn without errors.
|
|
This reverts commit 4414d9bf34f162a604d2aacc765ab1ca2fc90404.
|
|
This reverts commit e66ab79b8b5bc5311c750bf03868a7b2574f4ea1.
Conflicts:
bin/unicorn
|
|
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
|
|
This allows LOAD_PATH modifications via the command-line
(via -I or -rubygems on the command-line).
|
|
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.
|
|
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.
|
|
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.
|
|
Ensure the output fits in a standard ANSI terminal so it's easy
to read for all users regardless of what interface they're
working from.
|
|
Since not all rackup command-line options can be supported by
Unicorn, disable this gross hack to avoid potentially
unpredictable or undefined behavior. config.ru will not be able
to specify the config file for unicorn-specific options; but the
unicorn-specific config files themselves will be allowed to
override the default config.ru location.
|
|
This allows Unicorn to be constantly started in symlink
paths such as the ones Capistrano creates
(e.g. "/u/apps/$app/current")
|
|
This adds a bunch of execution tests that require the "unicorn"
binary to be in PATH as well as rack being directly
"require"-able ("rubygems" will not be loaded for you). The
tester is responsible for setting up PATH and RUBYLIB
appropriately.
|
|
|
|
This allows changing certain variables without restarting the
master process or code reload. Currently, only the following
variables are supported: @timeout, @nr_workers, @hot_config_file.
Any other config changes will/should require re-executing the
running binary. This config file is run through eval(); so it
really users plenty of rope to hang themselves with. Of course,
it requires valid Ruby syntax:
------------------------- 8< ------------------------
@nr_workers = 8
@timeout = 15
@hot_config_file = "/var/tmp/new_hot_config_file"
------------------------- 8< ------------------------
Lowering the timeout will trigger all existing workers to be
gracefully stopped and restarted.
This file is loaded at startup, and overrides any config
settings that may already be loaded.
|
|
Daemonization only happens once at initial startup and is less
intrusive than traditional daemonize routines: we do not chdir,
set umask, or redirect/close STDOUT/STDERR since those are
doable via other config options with Unicorn (and the Unicorn
"config file" is just Ruby).
STDIN has no business being open on a daemon (and can be
dangerous to close if using certain buggy third-party libs).
|
|
Along with worker process management. This is nginx-style
inplace upgrading (I don't know of another web server that does
this). Basically we can preserve our opened listen sockets
across entire executable upgrades.
Signals:
USR2 - Sending USR2 to the master unicorn process will cause
it to exec a new master and keep the original workers running.
This is useful to validate that the new code changes took place
are valid and don't immediately die. Once the changes are
validated (manually), you may send QUIT to the original
master process to have it gracefully exit.
HUP - Sending this to the master will make it immediately exec
a new binary and cause the old workers to gracefully exit.
Use this if you're certain the latest changes to Unicorn (and
your app) are ready and don't need validating.
Unlike nginx, re-execing a new binary will pick up any and all
configuration changes. However listener sockets cannot be
removed when exec-ing; only added (for now).
I apologize for making such a big change in one commit, but once
I got the ability to replace the entire codebase while preserving
connections, it was too tempting to continue working.
So I wrote a large chunk of this while hitting
the unicorn-hello-world app with the following loop:
while curl -vSsfN http://0:8080; do date +%N; done
_Zero_ requests lost across multiple restarts.
|
|
|
|
Breaks world.
Added option to throttle number of concurrent threads processing requests.
Conflicts:
bin/mongrel_rails
lib/mongrel.rb
lib/mongrel/configurator.rb
lib/mongrel/rails.rb
test/unit/test_ws.rb
|
|
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1013 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1005 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1004 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
Added shebang to mongrel_rails (makes latest RubyGem happier).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1000 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
Apply fix for Ragel 6 (Eric Wong, Ry Dahl).
Two tests fail with the new parser (1 failed with the old parser). Needs investigation.
Close #12 (mongrel_rails send_signal leaves a filehandle open until gc).
Close #14 (mongrel_rails command line option --num-procs does not change the max number of procs).
Close #15 (mongrel squashes helpful exception in register method).
Close #16, XXX needs audit! (CGIWrapper "options" attr_reader has no corresponding @options variable).
Close #20 (Mongrel doesn't erase temporary files during it's operation on windows).
Close #19, XXX needs audit! (HttpResponse#reset does not properly reset HeaderOut).
Close #22 (gem_plugin should load gems from Gem.path not Gem.dir).
Close #23 (mongrel_cluster's mongrel_rails configuration option isn't fully respected).
If I had git, being offline wouldn't have resulted in one massive commit.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@995 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@877 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@865 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@807 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@689 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@657 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
throttle not be zero for sub-second timeouts, improve documentation, update long command-line flags
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@624 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@578 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
please test :D
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@577 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@549 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
version in gemspec
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@548 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
kill -9 after the wait time.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@472 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@470 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@405 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@362 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@361 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
* Improve messaging for config file generation
* Remove unnecessary local var for config_file merging in mongrel_rails
* Add Iowa to list of supported frameworks in gem spec
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@353 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@352 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
been ultra bad about commits.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@349 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@324 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
I'm a lame moron.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@320 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@319 19e92222-5c0b-0410-8929-a290d50e31e9
|
|
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@313 19e92222-5c0b-0410-8929-a290d50e31e9
|