On 22 May 2012 10:14, Paul Hirst <[email protected]> wrote: > >> I have a custom patch with increases the javascript stack quota (from > 20M > >> to 200M). I need this to process some of the ridiculously large > documents I > >> have in my database. Without it the view build fails. I've been using it > >> since Couch 0.10. I recently built version 1.2 using build-couchdb for > the > >> first time, previously I was rolling my own Ubuntu packages but I > figured > >> build-couchdb might be easier. > >> > >> Is there I way I can apply custom patches when using build-couchdb? > > > >1.2.0 already supports this; > > > >Usage: couchjs [FILE] > > > >The couchjs command runs the Apache CouchDB JavaScript interpreter. > > > >The exit status is 0 for success or 1 for failure. > > > >Options: > > > > -h display a short help message and exit > > -V display version information and exit > > -H enable couchjs cURL bindings (only avaiable > > if package was built with cURL available) > > -S SIZE specify that the interpreter should set the > > stack quota for JS contexts to SIZE bytes > > > >Report bugs at <https://issues.apache.org/jira/browse/COUCHDB>. > > > > Great. It sounds like I don't need my patch. I have since found the page > on the wiki which documents this feature. It crept into 1.1.1 without me > noticing. > http://wiki.apache.org/couchdb/Performance#JavaScript_View_Server > > Unfortunately I've now tried using this option and it doesn't help even if > I set it to crazy sizes like 1G. I have isolated the offending document > (22M of JSON) and have been running couchjs manually on it but I get 'out > of memory' no matter what I do. I also tried applying my original patch but > that didn't help either (which is good in some sense). > > So for the moment I have trimmed down the document and updated it in the > database and my views are building once again. It only seems to be one > document out of ~80 million so far and I guess sometimes life is too short. > > > > >Re custom patches on build-couchdb, simplest approach is to fork, apply > >your patch to a custom branch and then use something like: > > > > rake git="git://me.github.com/couchdb.git a_fork" install=a_spoon > > That sounds like a good solution. I'll do that if I need my own patches in > future. > > Thanks a lot (and Jason too), > Paul. > > ________________________________ > > Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, > United Kingdom. > Company Reg No 2096520. VAT Reg No GB 991 2418 08. >
Hi Paul, Can you provide a suitably redacted version of the document, privately if reqd? A+ Dave
