couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hirst <>
Subject Re: Solving "os_process_error,{exit_status,0}" ?
Date Tue, 19 Oct 2010 08:17:07 GMT
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.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 @@
         return JS_FALSE;
+    JS_SetScriptStackQuota(subcx, 0x20000000);


@@ -285,6 +286,7 @@

     cx = 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.

View raw message