From user-return-13257-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Oct 19 08:17:47 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 43750 invoked from network); 19 Oct 2010 08:17:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 08:17:47 -0000 Received: (qmail 64662 invoked by uid 500); 19 Oct 2010 08:17:45 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 64331 invoked by uid 500); 19 Oct 2010 08:17:42 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 64323 invoked by uid 99); 19 Oct 2010 08:17:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 08:17:41 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.hirst@sophos.com designates 74.202.89.161 as permitted sender) Received: from [74.202.89.161] (HELO mx4.sophos.com) (74.202.89.161) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 08:17:33 +0000 Received: from mx4.sophos.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id C719A7026E for ; Tue, 19 Oct 2010 09:17:12 +0100 (BST) Received: from uk-exch2.green.sophos (uk-exch2.green.sophos [10.100.199.17]) by mx4.sophos.com (Postfix) with ESMTP id 551F57026D for ; Tue, 19 Oct 2010 09:17:12 +0100 (BST) Received: from [10.181.0.129] (10.181.0.129) by uk-exch2.green.sophos (10.100.199.10) with Microsoft SMTP Server (TLS) id 8.1.340.0; Tue, 19 Oct 2010 09:17:07 +0100 Subject: Re: Solving "os_process_error,{exit_status,0}" ? From: Paul Hirst To: "user@couchdb.apache.org" In-Reply-To: <4CBCA80E.6070704@cs.tu-darmstadt.de> References: <4CBCA80E.6070704@cs.tu-darmstadt.de> Content-Type: text/plain; charset="UTF-8" Date: Tue, 19 Oct 2010 09:17:07 +0100 Message-ID: <1287476227.30133.102.camel@meerkat.green.sophos> MIME-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sophos.com; h=subject:from:to:in-reply-to:references:content-type:date:message-id:mime-version:content-transfer-encoding; s=global; bh=opShHsMQB3JKdJAtevY7TVRJ5D1mrdYFCLQ4aMpa4AI=; b=uSYVBLjg3TRBI8t9e2mnjTiKoYpO7oq/uW5m19DQCPRgQj/9HltHFLqo21U8EZVaDaDGtK/fwCuSxZu1TCX+EaeQRm72bRzAMjjMjBfXuqfJLPEMr/rWSLCKTYpQ3vyxTdEMpac6C8Ey5HNJOAr3tl/vOl9numzZxmH5fLW+vlc= X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 2010-10-18 at 21:03 +0100, Marcel Bruch wrote: > Hi, > > I currently experimenting with CouchDB and run into > "os_process_error,{exit_status,0}" error when building my views. I've > read that large documents may cause this kind of exceptions - which > might be the reason in my case: The total database is ~3.2GB in size and > contains ~300k documents. Few documents are up to 15 MB large. > > Can anyone give me a hint how I can get around those os_process_errors? If it's the same problem I had, I applied the following patch to drastically increase the available stack memory. There didn't seem to be a way to do this without a compile. At some point I might try to turn this into a config option (and therefore presumably a command line switch to couchjs, but that's 100 times more effort than I've found time for yet. I'm not sure if there is a Jira ticket for this problem. I don't remember opening one myself. In fact I wasn't aware anyone had encountered the same problem. Maybe you could try the patch and let me know if it helps in your instance? diff -Naur couchdb-1.0.0.orig/src/couchdb/priv/couch_js/main.c couchdb-1.0.0/src/couchdb/priv/couch_js/main.c --- couchdb-1.0.0.orig/src/couchdb/priv/couch_js/main.c 2009-11-27 22:43:59.000000000 +0000 +++ couchdb-1.0.0/src/couchdb/priv/couch_js/main.c 2010-08-16 09:32:35.000000000 +0100 @@ -56,6 +56,7 @@ JS_ReportOutOfMemory(cx); return JS_FALSE; } + JS_SetScriptStackQuota(subcx, 0x20000000); SETUP_REQUEST(subcx); @@ -285,6 +286,7 @@ cx =3D JS_NewContext(rt, 8L * 1024L); if (!cx) return 1; + JS_SetScriptStackQuota(cx, 0x20000000); JS_SetErrorReporter(cx, printerror); JS_ToggleOptions(cx, JSOPTION_XML); Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United= Kingdom. Company Reg No 2096520. VAT Reg No GB 348 3873 20.