about summary refs log tree commit homepage
path: root/bin
DateCommit message (Collapse)
2009-04-02unicorn: remove unnecessary lambda generation
We can get by with one less lambda in the loader
2009-04-02unicorn_rails: cleanup redundant bits
There were some unnecessary lambdas in there along with some repeated checks.
2009-03-31unicorn_rails: cleanup path mapping usage
Just use the RAILS_RELATIVE_URL_ROOT variable to support it since probably works on more versions of Rails. Since no application I've ever deployed has ever used it, I'm not going to bother supporting it for Rails <2.3, either.
2009-03-31unicorn_rails: minor cleanup for dead variable
This removes half-implemented support to disable static file serving. People interested enough can provide their own config.ru file to save some stat(2) syscalls, but extra command-config options just complicate things.
2009-03-30unicorn_rails: give more info when aborting
Makes problems easier to solve if we dump the exception...
2009-03-30bin/*: parse CLI switches in config.ru sooner
This allows config.ru to specify listener and stuff before we setup the application.
2009-03-29Fix default listener setup
Combining command-line and config file options in a reasonable manner has and always will be a painful experience.
2009-03-23unicorn_rails: support non-Rack versions of Rails
This resurrects old code from Mongrel to wrap the Rails Dispatcher for older versions of Rails. It seems that Rails >= 2.2.0 support Rack, but only >=2.3 requires it. I'd like to support Rails 1.2.x for a while, too.
2009-03-20unicorn_rails: remove unnecessary Rack-loading logic
Loading Rails (or at least config/environment) will already load its version of Rack, duh! This also prevents a double-require of Rack causing redefined Rack::VERSION errors.
2009-03-19unicorn_rails: fix standard pid path setup
This was broken in the last commit (d1ff8c5): start libifying common launcher code
2009-03-19start libifying common launcher code
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.
2009-03-18Add unicorn_rails script for Rails 2.3.2
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.
2009-03-09Add -s/--server switch for compatibility with rackup
This allows config.ru files to be shared by rackup and unicorn without errors.
2009-03-09Revert "Remove -P/--pid switch from CLI"
This reverts commit 4414d9bf34f162a604d2aacc765ab1ca2fc90404.
2009-03-09Revert "exec: disable embedded switch parsing in config.ru"
This reverts commit e66ab79b8b5bc5311c750bf03868a7b2574f4ea1. Conflicts: bin/unicorn
2009-03-04Remove "directory" config option
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.
2009-03-04Ensure we always try to have a default listener
This is a followup to 11172f9bdcc7c57c9ae857a8088e49527a953fa1
2009-03-03require Rack as late as possible in execution
This allows LOAD_PATH modifications via the command-line (via -I or -rubygems on the command-line).
2009-03-03Allow stderr_path and stdout_path to be set in the config
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.
2009-03-03Begin to allow deferred app creation/loading
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.
2009-03-03Remove unnecessary separators in help text
Doesn't seem to make a difference for 1.8 but shows up in 1.9...
2009-03-03Remove -P/--pid switch from CLI
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.
2009-03-03test for "unicorn --help" output
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.
2009-03-03exec: disable embedded switch parsing in config.ru
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.
2009-02-23Allow overriding :directory or via -C/--directory
This allows Unicorn to be constantly started in symlink paths such as the ones Capistrano creates (e.g. "/u/apps/$app/current")
2009-02-21Replace unicorn binary with something rackup-like
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.
2009-02-10setup.rb friendliness
2009-02-10add hot_config_file config parameter
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.
2009-02-09daemonization by setting UNICORN_DAEMONIZE env
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).
2009-02-09Refactor and get exec + FD inheritance working
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.
2009-01-31No more throttling.
2009-01-31Merge pivotal code.
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
2009-01-31No commands.
2008-05-22I think that was a bug.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1013 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-17Document issue with soft restart pid file setting (closes #29).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1005 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-17Apply r1003 to stable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1004 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-31Somehow the RUBY_PLATFORM regexp got lost between branches... great!
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
2008-03-24Backport Eric's changes to the http parser from trunk (Eric Wong).
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
2007-11-12close #15539
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@877 19e92222-5c0b-0410-8929-a290d50e31e9
2007-11-01oops... gems is quite necessary
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@865 19e92222-5c0b-0410-8929-a290d50e31e9
2007-10-27obey address flag
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@807 19e92222-5c0b-0410-8929-a290d50e31e9
2007-10-18i feel like that should block
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@689 19e92222-5c0b-0410-8929-a290d50e31e9
2007-10-15timeout default was wrong
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@657 19e92222-5c0b-0410-8929-a290d50e31e9
2007-09-24refactor timeout and death_time to throttle and timeout, respectively, make ↵
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
2007-08-29Small documentation update. (closes: #13299)
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@578 19e92222-5c0b-0410-8929-a290d50e31e9
2007-08-25Validates log and PID paths after loading them from a config file. Guys, ↵
please test :D git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@577 19e92222-5c0b-0410-8929-a290d50e31e9
2007-08-14Corrected help text.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@549 19e92222-5c0b-0410-8929-a290d50e31e9
2007-08-13require cgi_multipart in mongrel itself, not mongrel_rails; bump required ↵
version in gemspec git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@548 19e92222-5c0b-0410-8929-a290d50e31e9
2006-12-16Wait parameter for stop --force which waits for the pid to go away, and then ↵
kill -9 after the wait time. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@472 19e92222-5c0b-0410-8929-a290d50e31e9
2006-12-16Whitelist for headers which can be duplicated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@470 19e92222-5c0b-0410-8929-a290d50e31e9