couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r931663 - in /couchdb/trunk: etc/couchdb/default.ini.tpl.in src/couchdb/couch_httpd.erl
Date Wed, 07 Apr 2010 20:07:59 GMT
Author: jchris
Date: Wed Apr  7 20:07:59 2010
New Revision: 931663

URL: http://svn.apache.org/viewvc?rev=931663&view=rev
Log:
make max_concurrent_connections configurable via Randall Leeds / COUCHDB-705

Modified:
    couchdb/trunk/etc/couchdb/default.ini.tpl.in
    couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: couchdb/trunk/etc/couchdb/default.ini.tpl.in
URL: http://svn.apache.org/viewvc/couchdb/trunk/etc/couchdb/default.ini.tpl.in?rev=931663&r1=931662&r2=931663&view=diff
==============================================================================
--- couchdb/trunk/etc/couchdb/default.ini.tpl.in (original)
+++ couchdb/trunk/etc/couchdb/default.ini.tpl.in Wed Apr  7 20:07:59 2010
@@ -17,6 +17,7 @@ batch_save_interval = 1000 ; millisecond
 [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}
 

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=931663&r1=931662&r2=931663&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Wed Apr  7 20:07:59 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", _) ->



Mime
View raw message