Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 33169 invoked from network); 19 Jul 2008 01:43:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jul 2008 01:43:46 -0000 Received: (qmail 32308 invoked by uid 500); 19 Jul 2008 01:43:45 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 32274 invoked by uid 500); 19 Jul 2008 01:43:45 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 32263 invoked by uid 99); 19 Jul 2008 01:43:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 18:43:45 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jul 2008 01:42:51 +0000 Received: from [10.0.2.3] (e179139043.adsl.alicedsl.de [::ffff:85.179.139.43]) (AUTH: LOGIN jan, SSL: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Sat, 19 Jul 2008 01:37:10 +0000 Message-Id: <95D76033-7D1E-4232-BF5A-E2A2597ED418@apache.org> From: Jan Lehnardt To: couchdb-user@incubator.apache.org In-Reply-To: <64a10fff0807181735m626c1fd9vc96c08622ee37b6@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Subject: Re: attachment file size limit? Date: Sat, 19 Jul 2008 03:37:08 +0200 References: <64a10fff0807181735m626c1fd9vc96c08622ee37b6@mail.gmail.com> X-Mailer: Apple Mail (2.928.1) X-Virus-Checked: Checked by ClamAV on apache.org On Jul 19, 2008, at 02:35, Dean Landolt wrote: > I seem to be running up an arbitrary file size limit in MochiWeb. For > smaller files I'm in good shape, but once I get upward of a few megs > I get > this back from MochiWeb: > > {"error":"EXIT","reason":"{body_too_large,6099917}"} > > I poked around in the MochiWeb source and it looks like there's a > setting > for this, but I haven't explored further yet. > > I tried to use chunked encoding but I seem to run into a socket > error issue > with httplib: 104, connection reset by peer. Seems like MochiWeb > doesn't > like that very much, but that could just be httplib. Still trying to > work > through that... > > In any event, has anyone pushed in large attachments with the new > api? Is > there something I'm missing? Thanks... The current limit for request sizes is 1MB (didn't we up that to 4GB? Christopher, maybe that got lost with recent MochiWeb updates?). You can set the size for yourself in src/mochiweb/mochiweb_request.erl -define(MAX_RECV_BODY, (1024*1024)). <- that is the line. Then recompile and you are good to go. I was able to push 2.5GB into an attachment. Please note that CouchDB holds the entire attachment in memory, even with a chunked request, before writing it to disk. This is a current design limitation and will be removed for 0.9. We are aware that this stinks, but so far the new API removed the need for base64 which was another performance killer. Streamed read and write operations will follow. I used curl to make successful chunked requests. Cheers Jan --