diff options
author | Ian Ownbey <imownbey@gmail.com> | 2008-11-22 18:56:06 -0800 |
---|---|---|
committer | Ian Ownbey <imownbey@gmail.com> | 2008-11-22 18:56:06 -0800 |
commit | 5139bbfd22c48e29ea6c66d3e47631877db65492 (patch) | |
tree | d0a38df2751da5b7a2f95de76730969716605fbf /lib/mongrel.rb | |
parent | 18ac0fcc47f5533d695d629ca60f6d8cd2befd3f (diff) | |
download | unicorn-5139bbfd22c48e29ea6c66d3e47631877db65492.tar.gz |
Diffstat (limited to 'lib/mongrel.rb')
-rw-r--r-- | lib/mongrel.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb index 423abeb..57b849b 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -101,7 +101,7 @@ module Mongrel @workers = ThreadGroup.new # Set default opts @app = app - @num_processors = opts.delete(:num_processors) + @num_processors = opts.delete(:num_processors) || 950 @throttle = (opts.delete(:throttle) || 0) / 100 @timeout = opts.delete(:timeout) || 60 end @@ -244,7 +244,6 @@ module Mongrel # Runs the thing. It returns the thread used so you can "join" it. You can also # access the HttpServer::acceptor attribute to get the thread later. def start! - p @num_processors BasicSocket.do_not_reverse_lookup=true configure_socket_options @@ -264,7 +263,6 @@ module Mongrel end worker_list = @workers.list - if worker_list.length >= @num_processors STDERR.puts "Server overloaded with #{worker_list.length} processors (#@num_processors max). Dropping connection." client.close rescue nil @@ -296,7 +294,7 @@ module Mongrel end end - return @acceptor + return @acceptor.join end # Simply registers a handler with the internal URIClassifier. When the URI is |