You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2010/06/14 16:28:39 UTC
svn commit: r954483 - in /couchdb/branches/0.11.x:
etc/couchdb/default.ini.tpl.in src/couchdb/couch_httpd.erl
Author: jan
Date: Mon Jun 14 14:28:39 2010
New Revision: 954483
URL: http://svn.apache.org/viewvc?rev=954483&view=rev
Log:
Merge from trunk: make max_concurrent_connections configurable via Randall Leeds / COUCHDB-705
Modified:
couchdb/branches/0.11.x/etc/couchdb/default.ini.tpl.in
couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl
Modified: couchdb/branches/0.11.x/etc/couchdb/default.ini.tpl.in
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/etc/couchdb/default.ini.tpl.in?rev=954483&r1=954482&r2=954483&view=diff
==============================================================================
--- couchdb/branches/0.11.x/etc/couchdb/default.ini.tpl.in (original)
+++ couchdb/branches/0.11.x/etc/couchdb/default.ini.tpl.in Mon Jun 14 14:28:39 2010
@@ -15,6 +15,7 @@ delayed_commits = true ; set this to fal
[httpd]
port = 5984
bind_address = 127.0.0.1
+max_connections = 2048
authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
default_handler = {couch_httpd_db, handle_request}
secure_rewrites = true
Modified: couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl?rev=954483&r1=954482&r2=954483&view=diff
==============================================================================
--- couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl (original)
+++ couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl Mon Jun 14 14:28:39 2010
@@ -35,6 +35,7 @@ start_link() ->
BindAddress = couch_config:get("httpd", "bind_address", any),
Port = couch_config:get("httpd", "port", "5984"),
+ MaxConnections = couch_config:get("httpd", "max_connections", "2048"),
VirtualHosts = couch_config:get("vhosts"),
DefaultSpec = "{couch_httpd_db, handle_request}",
@@ -73,7 +74,8 @@ start_link() ->
{loop, Loop},
{name, ?MODULE},
{ip, BindAddress},
- {port, Port}
+ {port, Port},
+ {max, MaxConnections}
]) of
{ok, MochiPid} -> {ok, MochiPid};
{error, Reason} ->
@@ -86,6 +88,8 @@ start_link() ->
?MODULE:stop();
("httpd", "port") ->
?MODULE:stop();
+ ("httpd", "max_connections") ->
+ ?MODULE:stop();
("httpd", "default_handler") ->
?MODULE:stop();
("httpd_global_handlers", _) ->