From 56ae99118f5c35612fe4fc440480984ea1e7aa29 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Wed, 7 Apr 2010 20:07:59 +0000 Subject: make max_concurrent_connections configurable via Randall Leeds / COUCHDB-705 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@931663 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index b25242fd..f9cb7f40 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -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", _) -> -- cgit v1.2.3