[ 
https://issues.apache.org/jira/browse/COUCHDB-893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922653#action_12922653
 ] 

Michael Schneider commented on COUCHDB-893:
-------------------------------------------

>From email

From:   Paul Hirst <[email protected]>
Reply-to:       [email protected]
To:     [email protected] <[email protected]>
Subject:        Re: Solving "os_process_error,{exit_status,0}" ?
Date:   Tue, 19 Oct 2010 09:17:07 +0100 (10/19/2010 04:17:07 AM)



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


> Error: os_process_error  {exit_status,0}  when rendering view on 17 mb doc,  
> couchapp and data attached
> -------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-893
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-893
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>         Environment: I repeated this on windows and linux (64 bit)
>            Reporter: Michael Schneider
>         Attachments: bugdoc.tar.gz
>
>
> I have a large set of documents that  I harvesting data from.  All docs < 9mb 
> render fine (with doc size increased)
> Attached is a simple couchapp and one doc.
> To reproduce, untar and:
>  reproduce
> 1)  untar file
> 2) cd bugdoc/couchapp/bugreport
> 3) couchapp push bugreport
> 4) cd bugdoc
> 5) python submitbadjson.py
> open url 
> http://127.0.0.1:5984/_utils/database.html?bugreport/_design/bugreport/_view/buggy
> You should see a popup
> "(Error: os_process_error
> {exit_status,0})
> "

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to