I'm just getting started with CouchDB and I noticed that mochikit restricts document sizes to one megabyte. Is there a reason to limit the size of documents other than to prevent DoS attacks? I modified my copy of CouchDB with the attached patch and increased the maximum document size to 50MB. I was able to successfully save a large document (although I haven't tried pulling it out yet). The reason that I want such large objects is to store images in the database, and have the images replicated for redundancy.
Jeff
diff --git a/src/mochiweb/mochiweb_request.erl b/src/mochiweb/mochiweb_request.erl index fd15cea..a6e8f49 100644 --- a/src/mochiweb/mochiweb_request.erl +++ b/src/mochiweb/mochiweb_request.erl @@ -42,7 +42,7 @@ -define(IDLE_TIMEOUT, 10000). % Maximum recv_body() length of 1MB --define(MAX_RECV_BODY, (1024*1024)). +-define(MAX_RECV_BODY, (50*1024*1024)). %% @spec get_header_value(K) -> undefined | Value %% @doc Get the value of a given request header.
