about summary refs log tree commit homepage
path: root/bin
DateCommit message (Collapse)
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
2006-11-21Removed the now obsolete _service and _svc scripts from trunk, yahoo!
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@405 19e92222-5c0b-0410-8929-a290d50e31e9
2006-10-24Fixes --group and --user options.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@362 19e92222-5c0b-0410-8929-a290d50e31e9
2006-10-24First changes for inclusion of the cgi multipart fix.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@361 19e92222-5c0b-0410-8929-a290d50e31e9
2006-09-26* Cosmetic code/comment formatting
* 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
2006-09-26Fixes a bug on OSX by changing from exec to system on restart.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@352 19e92222-5c0b-0410-8929-a290d50e31e9
2006-09-22Mongrel 0.3.13.5 version bump. Final commit of changes from 0.3.13.4. I've ↵
been ultra bad about commits. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@349 19e92222-5c0b-0410-8929-a290d50e31e9
2006-08-14Now properly handles the PID from -c on stop/restart.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@324 19e92222-5c0b-0410-8929-a290d50e31e9
2006-08-12Fixes redirects not working with new unlocked IO, becase Matt P. showed me ↵
I'm a lame moron. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@320 19e92222-5c0b-0410-8929-a290d50e31e9
2006-08-12Restart didn't have the pid_file fix.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@319 19e92222-5c0b-0410-8929-a290d50e31e9
2006-08-12Fix so that response output is not locked while Rails is locked.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@313 19e92222-5c0b-0410-8929-a290d50e31e9
2006-08-11Fixes bug where PID file not written when in config file. Improves error ↵
messages as well. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@312 19e92222-5c0b-0410-8929-a290d50e31e9
2006-08-08Fixes the confusion in the PID and log file settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@310 19e92222-5c0b-0410-8929-a290d50e31e9
2006-08-05An extra check on prefix to make sure it's perfect.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@304 19e92222-5c0b-0410-8929-a290d50e31e9
2006-07-14Bugfixes for 0.3.13.4 release firming up IO tweaks.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@293 19e92222-5c0b-0410-8929-a290d50e31e9
2006-07-13Backport of HttpRequest enhancements from 0.4. Patch to specify --prefix ↵
from Scott Laird. Fix for ids not working with GC. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@292 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-30Documentation update and sync with latest code.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@269 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-30Ruby license applied to all files
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@267 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-30Switched Mongrel to Ruby license.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@265 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-21Fixes a bug that broke -C for start.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@249 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-16Cleaned up the logging output to be more 'unix style'. Give a big warning ↵
if you try to run twice in daemon mode. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@240 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-15Major bug fixed where sockets would get leaked if the client closed early ↵
(or any socket errors from the client). git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@238 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-08Fixes a bug where default settings always dominated config files.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@232 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-05Fixes bugs 4658, 4478, 4402, and minor fix for the katana killer concurrency ↵
change. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@227 19e92222-5c0b-0410-8929-a290d50e31e9
2006-06-05Late night hackery. Moving code for checking users and groups to common ↵
place, letting people who set allow_concurrency shoot themselves in the foot. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@225 19e92222-5c0b-0410-8929-a290d50e31e9
2006-05-23PID file wiping is now stopped, and also allows to run a debug without ↵
wiping the PID file. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@206 19e92222-5c0b-0410-8929-a290d50e31e9
2006-05-23Bug 4414 fixed, should no longer clobber pid file
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@205 19e92222-5c0b-0410-8929-a290d50e31e9