You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Donal Simmie <do...@gmail.com> on 2013/01/17 15:59:57 UTC

View creation error on specific DB

I am getting an os error on view creation for a certain database. All my
views for other databases are working but I cannot create any on this one
without it failing.

The error message is: os_process_error,{exit_status,0}}

I was trying a proper view but even this basic one is broken:

function(doc) {
  emit(1, doc);
}

Note:
I have been using Futon for view creation.
The all documents view is fine and documents themselves can be viewed.
I altered the default configuration file by adding a compactions section
with the following key/value pair: -default: [{db_fragmentation, "70%"},
{view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
The DB in question contains 3.6 GB of data.

Version: 1.2
Os: Mac OS X 10.8.2

The trace in the log file is available here: http://pastebin.com/AdrJ6jeB

Any suggestions please?

Re: View creation error on specific DB

Posted by Robert Newson <rn...@apache.org>.
The emit is not the problem, I'm saying we crash attempting to get the
doc *argument* in.

On 21 January 2013 12:18, Dave Cottlehuber <dc...@jsonified.com> wrote:
> On 21 January 2013 17:39, Paul Davis <pa...@gmail.com> wrote:
>> Sounds like a stack size issue. Try setting -S to something largish
>> (10485760 or so) on the couchjs command line in your default.ini
>>
>>
>> On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <do...@gmail.com>wrote:
>>
>>> As an update I have tried numerous approaches to attempt to fix/workaround
>>> this problem:
>>>
>>> 1. Compacting the database.
>>> 2. Replicating to a local copy of the DB and retrying view creation.
>>> 3. Dumping DB contents to JSON with dump.py and loading into another DB
>>> with load.py
>>>
>>> None of these worked.
>>>
>>> After downloading the couchdb-python library I added the python view server
>>> to Futon and ran view code in python and this does fix the problem.
>>>
>>> So if the problem is with the javascript view server, does this help in
>>> identifying what the issue might be and how I could fix it?
>>>
>>> E.g.
>>>
>>> Bad entry in config file,
>>> Corrupt document(s),
>>> Something else??
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <donal.simmie@gmail.com
>>> >wrote:
>>>
>>> > I am getting an os error on view creation for a certain database. All my
>>> > views for other databases are working but I cannot create any on this one
>>> > without it failing.
>>> >
>>> > The error message is: os_process_error,{exit_status,0}}
>>> >
>>> > I was trying a proper view but even this basic one is broken:
>>> >
>>> > function(doc) {
>>> >   emit(1, doc);
>>> > }
>>> >
>>> > Note:
>>> > I have been using Futon for view creation.
>>> > The all documents view is fine and documents themselves can be viewed.
>>> > I altered the default configuration file by adding a compactions section
>>> > with the following key/value pair: -default: [{db_fragmentation, "70%"},
>>> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
>>> > The DB in question contains 3.6 GB of data.
>>> >
>>> > Version: 1.2
>>> > Os: Mac OS X 10.8.2
>>> >
>>> > The trace in the log file is available here:
>>> http://pastebin.com/AdrJ6jeB
>>> >
>>> > Any suggestions please?
>>> >
>>>
>
> All wot Paul & Bob said, & does it still fail if you emit(1, null) ?
>
> there's no need to re-emit the entire doc, you can always retrieve it
> via ?include_docs=true . See
> http://wiki.apache.org/couchdb/Frequently_asked_questions#Creating_my_view_index_takes_ages.2C_WTF.3F
> and http://wiki.apache.org/couchdb/FUQ#Views
>
> A+D

Re: View creation error on specific DB

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 21 January 2013 17:39, Paul Davis <pa...@gmail.com> wrote:
> Sounds like a stack size issue. Try setting -S to something largish
> (10485760 or so) on the couchjs command line in your default.ini
>
>
> On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <do...@gmail.com>wrote:
>
>> As an update I have tried numerous approaches to attempt to fix/workaround
>> this problem:
>>
>> 1. Compacting the database.
>> 2. Replicating to a local copy of the DB and retrying view creation.
>> 3. Dumping DB contents to JSON with dump.py and loading into another DB
>> with load.py
>>
>> None of these worked.
>>
>> After downloading the couchdb-python library I added the python view server
>> to Futon and ran view code in python and this does fix the problem.
>>
>> So if the problem is with the javascript view server, does this help in
>> identifying what the issue might be and how I could fix it?
>>
>> E.g.
>>
>> Bad entry in config file,
>> Corrupt document(s),
>> Something else??
>>
>> Thanks
>>
>>
>>
>>
>>
>> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <donal.simmie@gmail.com
>> >wrote:
>>
>> > I am getting an os error on view creation for a certain database. All my
>> > views for other databases are working but I cannot create any on this one
>> > without it failing.
>> >
>> > The error message is: os_process_error,{exit_status,0}}
>> >
>> > I was trying a proper view but even this basic one is broken:
>> >
>> > function(doc) {
>> >   emit(1, doc);
>> > }
>> >
>> > Note:
>> > I have been using Futon for view creation.
>> > The all documents view is fine and documents themselves can be viewed.
>> > I altered the default configuration file by adding a compactions section
>> > with the following key/value pair: -default: [{db_fragmentation, "70%"},
>> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
>> > The DB in question contains 3.6 GB of data.
>> >
>> > Version: 1.2
>> > Os: Mac OS X 10.8.2
>> >
>> > The trace in the log file is available here:
>> http://pastebin.com/AdrJ6jeB
>> >
>> > Any suggestions please?
>> >
>>

All wot Paul & Bob said, & does it still fail if you emit(1, null) ?

there's no need to re-emit the entire doc, you can always retrieve it
via ?include_docs=true . See
http://wiki.apache.org/couchdb/Frequently_asked_questions#Creating_my_view_index_takes_ages.2C_WTF.3F
and http://wiki.apache.org/couchdb/FUQ#Views

A+D

Re: View creation error on specific DB

Posted by Robert Newson <rn...@apache.org>.
Thanks for the update. Curious cut-off point!

On 23 January 2013 19:01, Donal Simmie <do...@gmail.com> wrote:
> Update:
>
> I deleted the largest document in the database, which was 14.6 MB and then
> re-tried creating views from the js view server and they worked.
>
> There are a still a number of docs which are 11 MB so the process hang must
> occur at some value greater than 11 MB.
>
> Note: I am using Chrome/Futon to create these views.
>
>
>
> On Mon, Jan 21, 2013 at 5:51 PM, Robert Newson <rn...@apache.org> wrote:
>
>> Nope, the -S parameter has never done what it claims.
>>
>> B.
>>
>> On 21 January 2013 12:48, Donal Simmie <do...@gmail.com> wrote:
>> > I did try your approach Paul before I saw Robert's follow up and the same
>> > thing happened.
>> >
>> > The error log is here in case sheds any light:
>> >
>> > http://pastebin.com/nFxU80FG - it doesn't for me ;)
>> >
>> > This time I was using a simpler emit than the second param being doc and
>> > wouldn't generally emit the entire doc but thanks for link to that
>> article
>> > Dave.
>> >
>> > This was the view code I used this time:
>> >
>> > function(doc) {
>> >   emit(doc.user.screen_name, doc.user.id);
>> > }
>> >
>> > Robert as for the view stack size setting not being a useful setting, it
>> is
>> > suggested here
>> > http://wiki.apache.org/couchdb/Performance#JavaScript_View_Server that
>> this
>> > can be altered if there a problem in the logs that indicates stack size
>> > might be an issue. Is this still valid advice?
>> >
>> > Thanks for the suggestions.
>> >
>> >
>> >
>> > On Mon, Jan 21, 2013 at 5:22 PM, Paul Davis <paul.joseph.davis@gmail.com
>> >wrote:
>> >
>> >> Well ain't that a knock in the teeth. Never seen that note before so it
>> >> must've been something lots of people were mistaking that API for.
>> >>
>> >> I've got no idea how to fix this then.
>> >>
>> >>
>> >> On Mon, Jan 21, 2013 at 11:19 AM, Robert Newson <rn...@apache.org>
>> >> wrote:
>> >>
>> >> > Paul, you know that -S doesn't change the stack size just the size of
>> >> > stack fragments. It's a useless setting afaict;
>> >> >
>> >> > from
>> >> >
>> >>
>> https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_NewContext
>> >> >
>> >> > "The stackchunksize parameter does not control the JavaScript stack
>> >> > size. (The JSAPI does not provide a way to adjust the stack depth
>> >> > limit.) Passing a large number forstackchunksize is a mistake."
>> >> >
>> >> > B.
>> >> >
>> >> > On 21 January 2013 11:39, Paul Davis <pa...@gmail.com>
>> >> wrote:
>> >> > > Sounds like a stack size issue. Try setting -S to something largish
>> >> > > (10485760 or so) on the couchjs command line in your default.ini
>> >> > >
>> >> > >
>> >> > > On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <
>> donal.simmie@gmail.com
>> >> > >wrote:
>> >> > >
>> >> > >> As an update I have tried numerous approaches to attempt to
>> >> > fix/workaround
>> >> > >> this problem:
>> >> > >>
>> >> > >> 1. Compacting the database.
>> >> > >> 2. Replicating to a local copy of the DB and retrying view
>> creation.
>> >> > >> 3. Dumping DB contents to JSON with dump.py and loading into
>> another
>> >> DB
>> >> > >> with load.py
>> >> > >>
>> >> > >> None of these worked.
>> >> > >>
>> >> > >> After downloading the couchdb-python library I added the python
>> view
>> >> > server
>> >> > >> to Futon and ran view code in python and this does fix the problem.
>> >> > >>
>> >> > >> So if the problem is with the javascript view server, does this
>> help
>> >> in
>> >> > >> identifying what the issue might be and how I could fix it?
>> >> > >>
>> >> > >> E.g.
>> >> > >>
>> >> > >> Bad entry in config file,
>> >> > >> Corrupt document(s),
>> >> > >> Something else??
>> >> > >>
>> >> > >> Thanks
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <
>> donal.simmie@gmail.com
>> >> > >> >wrote:
>> >> > >>
>> >> > >> > I am getting an os error on view creation for a certain database.
>> >> All
>> >> > my
>> >> > >> > views for other databases are working but I cannot create any on
>> >> this
>> >> > one
>> >> > >> > without it failing.
>> >> > >> >
>> >> > >> > The error message is: os_process_error,{exit_status,0}}
>> >> > >> >
>> >> > >> > I was trying a proper view but even this basic one is broken:
>> >> > >> >
>> >> > >> > function(doc) {
>> >> > >> >   emit(1, doc);
>> >> > >> > }
>> >> > >> >
>> >> > >> > Note:
>> >> > >> > I have been using Futon for view creation.
>> >> > >> > The all documents view is fine and documents themselves can be
>> >> viewed.
>> >> > >> > I altered the default configuration file by adding a compactions
>> >> > section
>> >> > >> > with the following key/value pair: -default: [{db_fragmentation,
>> >> > "70%"},
>> >> > >> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
>> >> > >> > The DB in question contains 3.6 GB of data.
>> >> > >> >
>> >> > >> > Version: 1.2
>> >> > >> > Os: Mac OS X 10.8.2
>> >> > >> >
>> >> > >> > The trace in the log file is available here:
>> >> > >> http://pastebin.com/AdrJ6jeB
>> >> > >> >
>> >> > >> > Any suggestions please?
>> >> > >> >
>> >> > >>
>> >> >
>> >>
>>

Re: View creation error on specific DB

Posted by Donal Simmie <do...@gmail.com>.
Update:

I deleted the largest document in the database, which was 14.6 MB and then
re-tried creating views from the js view server and they worked.

There are a still a number of docs which are 11 MB so the process hang must
occur at some value greater than 11 MB.

Note: I am using Chrome/Futon to create these views.



On Mon, Jan 21, 2013 at 5:51 PM, Robert Newson <rn...@apache.org> wrote:

> Nope, the -S parameter has never done what it claims.
>
> B.
>
> On 21 January 2013 12:48, Donal Simmie <do...@gmail.com> wrote:
> > I did try your approach Paul before I saw Robert's follow up and the same
> > thing happened.
> >
> > The error log is here in case sheds any light:
> >
> > http://pastebin.com/nFxU80FG - it doesn't for me ;)
> >
> > This time I was using a simpler emit than the second param being doc and
> > wouldn't generally emit the entire doc but thanks for link to that
> article
> > Dave.
> >
> > This was the view code I used this time:
> >
> > function(doc) {
> >   emit(doc.user.screen_name, doc.user.id);
> > }
> >
> > Robert as for the view stack size setting not being a useful setting, it
> is
> > suggested here
> > http://wiki.apache.org/couchdb/Performance#JavaScript_View_Server that
> this
> > can be altered if there a problem in the logs that indicates stack size
> > might be an issue. Is this still valid advice?
> >
> > Thanks for the suggestions.
> >
> >
> >
> > On Mon, Jan 21, 2013 at 5:22 PM, Paul Davis <paul.joseph.davis@gmail.com
> >wrote:
> >
> >> Well ain't that a knock in the teeth. Never seen that note before so it
> >> must've been something lots of people were mistaking that API for.
> >>
> >> I've got no idea how to fix this then.
> >>
> >>
> >> On Mon, Jan 21, 2013 at 11:19 AM, Robert Newson <rn...@apache.org>
> >> wrote:
> >>
> >> > Paul, you know that -S doesn't change the stack size just the size of
> >> > stack fragments. It's a useless setting afaict;
> >> >
> >> > from
> >> >
> >>
> https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_NewContext
> >> >
> >> > "The stackchunksize parameter does not control the JavaScript stack
> >> > size. (The JSAPI does not provide a way to adjust the stack depth
> >> > limit.) Passing a large number forstackchunksize is a mistake."
> >> >
> >> > B.
> >> >
> >> > On 21 January 2013 11:39, Paul Davis <pa...@gmail.com>
> >> wrote:
> >> > > Sounds like a stack size issue. Try setting -S to something largish
> >> > > (10485760 or so) on the couchjs command line in your default.ini
> >> > >
> >> > >
> >> > > On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <
> donal.simmie@gmail.com
> >> > >wrote:
> >> > >
> >> > >> As an update I have tried numerous approaches to attempt to
> >> > fix/workaround
> >> > >> this problem:
> >> > >>
> >> > >> 1. Compacting the database.
> >> > >> 2. Replicating to a local copy of the DB and retrying view
> creation.
> >> > >> 3. Dumping DB contents to JSON with dump.py and loading into
> another
> >> DB
> >> > >> with load.py
> >> > >>
> >> > >> None of these worked.
> >> > >>
> >> > >> After downloading the couchdb-python library I added the python
> view
> >> > server
> >> > >> to Futon and ran view code in python and this does fix the problem.
> >> > >>
> >> > >> So if the problem is with the javascript view server, does this
> help
> >> in
> >> > >> identifying what the issue might be and how I could fix it?
> >> > >>
> >> > >> E.g.
> >> > >>
> >> > >> Bad entry in config file,
> >> > >> Corrupt document(s),
> >> > >> Something else??
> >> > >>
> >> > >> Thanks
> >> > >>
> >> > >>
> >> > >>
> >> > >>
> >> > >>
> >> > >> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <
> donal.simmie@gmail.com
> >> > >> >wrote:
> >> > >>
> >> > >> > I am getting an os error on view creation for a certain database.
> >> All
> >> > my
> >> > >> > views for other databases are working but I cannot create any on
> >> this
> >> > one
> >> > >> > without it failing.
> >> > >> >
> >> > >> > The error message is: os_process_error,{exit_status,0}}
> >> > >> >
> >> > >> > I was trying a proper view but even this basic one is broken:
> >> > >> >
> >> > >> > function(doc) {
> >> > >> >   emit(1, doc);
> >> > >> > }
> >> > >> >
> >> > >> > Note:
> >> > >> > I have been using Futon for view creation.
> >> > >> > The all documents view is fine and documents themselves can be
> >> viewed.
> >> > >> > I altered the default configuration file by adding a compactions
> >> > section
> >> > >> > with the following key/value pair: -default: [{db_fragmentation,
> >> > "70%"},
> >> > >> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
> >> > >> > The DB in question contains 3.6 GB of data.
> >> > >> >
> >> > >> > Version: 1.2
> >> > >> > Os: Mac OS X 10.8.2
> >> > >> >
> >> > >> > The trace in the log file is available here:
> >> > >> http://pastebin.com/AdrJ6jeB
> >> > >> >
> >> > >> > Any suggestions please?
> >> > >> >
> >> > >>
> >> >
> >>
>

Re: View creation error on specific DB

Posted by Robert Newson <rn...@apache.org>.
Nope, the -S parameter has never done what it claims.

B.

On 21 January 2013 12:48, Donal Simmie <do...@gmail.com> wrote:
> I did try your approach Paul before I saw Robert's follow up and the same
> thing happened.
>
> The error log is here in case sheds any light:
>
> http://pastebin.com/nFxU80FG - it doesn't for me ;)
>
> This time I was using a simpler emit than the second param being doc and
> wouldn't generally emit the entire doc but thanks for link to that article
> Dave.
>
> This was the view code I used this time:
>
> function(doc) {
>   emit(doc.user.screen_name, doc.user.id);
> }
>
> Robert as for the view stack size setting not being a useful setting, it is
> suggested here
> http://wiki.apache.org/couchdb/Performance#JavaScript_View_Server that this
> can be altered if there a problem in the logs that indicates stack size
> might be an issue. Is this still valid advice?
>
> Thanks for the suggestions.
>
>
>
> On Mon, Jan 21, 2013 at 5:22 PM, Paul Davis <pa...@gmail.com>wrote:
>
>> Well ain't that a knock in the teeth. Never seen that note before so it
>> must've been something lots of people were mistaking that API for.
>>
>> I've got no idea how to fix this then.
>>
>>
>> On Mon, Jan 21, 2013 at 11:19 AM, Robert Newson <rn...@apache.org>
>> wrote:
>>
>> > Paul, you know that -S doesn't change the stack size just the size of
>> > stack fragments. It's a useless setting afaict;
>> >
>> > from
>> >
>> https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_NewContext
>> >
>> > "The stackchunksize parameter does not control the JavaScript stack
>> > size. (The JSAPI does not provide a way to adjust the stack depth
>> > limit.) Passing a large number forstackchunksize is a mistake."
>> >
>> > B.
>> >
>> > On 21 January 2013 11:39, Paul Davis <pa...@gmail.com>
>> wrote:
>> > > Sounds like a stack size issue. Try setting -S to something largish
>> > > (10485760 or so) on the couchjs command line in your default.ini
>> > >
>> > >
>> > > On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <donal.simmie@gmail.com
>> > >wrote:
>> > >
>> > >> As an update I have tried numerous approaches to attempt to
>> > fix/workaround
>> > >> this problem:
>> > >>
>> > >> 1. Compacting the database.
>> > >> 2. Replicating to a local copy of the DB and retrying view creation.
>> > >> 3. Dumping DB contents to JSON with dump.py and loading into another
>> DB
>> > >> with load.py
>> > >>
>> > >> None of these worked.
>> > >>
>> > >> After downloading the couchdb-python library I added the python view
>> > server
>> > >> to Futon and ran view code in python and this does fix the problem.
>> > >>
>> > >> So if the problem is with the javascript view server, does this help
>> in
>> > >> identifying what the issue might be and how I could fix it?
>> > >>
>> > >> E.g.
>> > >>
>> > >> Bad entry in config file,
>> > >> Corrupt document(s),
>> > >> Something else??
>> > >>
>> > >> Thanks
>> > >>
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <donal.simmie@gmail.com
>> > >> >wrote:
>> > >>
>> > >> > I am getting an os error on view creation for a certain database.
>> All
>> > my
>> > >> > views for other databases are working but I cannot create any on
>> this
>> > one
>> > >> > without it failing.
>> > >> >
>> > >> > The error message is: os_process_error,{exit_status,0}}
>> > >> >
>> > >> > I was trying a proper view but even this basic one is broken:
>> > >> >
>> > >> > function(doc) {
>> > >> >   emit(1, doc);
>> > >> > }
>> > >> >
>> > >> > Note:
>> > >> > I have been using Futon for view creation.
>> > >> > The all documents view is fine and documents themselves can be
>> viewed.
>> > >> > I altered the default configuration file by adding a compactions
>> > section
>> > >> > with the following key/value pair: -default: [{db_fragmentation,
>> > "70%"},
>> > >> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
>> > >> > The DB in question contains 3.6 GB of data.
>> > >> >
>> > >> > Version: 1.2
>> > >> > Os: Mac OS X 10.8.2
>> > >> >
>> > >> > The trace in the log file is available here:
>> > >> http://pastebin.com/AdrJ6jeB
>> > >> >
>> > >> > Any suggestions please?
>> > >> >
>> > >>
>> >
>>

Re: View creation error on specific DB

Posted by Donal Simmie <do...@gmail.com>.
I did try your approach Paul before I saw Robert's follow up and the same
thing happened.

The error log is here in case sheds any light:

http://pastebin.com/nFxU80FG - it doesn't for me ;)

This time I was using a simpler emit than the second param being doc and
wouldn't generally emit the entire doc but thanks for link to that article
Dave.

This was the view code I used this time:

function(doc) {
  emit(doc.user.screen_name, doc.user.id);
}

Robert as for the view stack size setting not being a useful setting, it is
suggested here
http://wiki.apache.org/couchdb/Performance#JavaScript_View_Server that this
can be altered if there a problem in the logs that indicates stack size
might be an issue. Is this still valid advice?

Thanks for the suggestions.



On Mon, Jan 21, 2013 at 5:22 PM, Paul Davis <pa...@gmail.com>wrote:

> Well ain't that a knock in the teeth. Never seen that note before so it
> must've been something lots of people were mistaking that API for.
>
> I've got no idea how to fix this then.
>
>
> On Mon, Jan 21, 2013 at 11:19 AM, Robert Newson <rn...@apache.org>
> wrote:
>
> > Paul, you know that -S doesn't change the stack size just the size of
> > stack fragments. It's a useless setting afaict;
> >
> > from
> >
> https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_NewContext
> >
> > "The stackchunksize parameter does not control the JavaScript stack
> > size. (The JSAPI does not provide a way to adjust the stack depth
> > limit.) Passing a large number forstackchunksize is a mistake."
> >
> > B.
> >
> > On 21 January 2013 11:39, Paul Davis <pa...@gmail.com>
> wrote:
> > > Sounds like a stack size issue. Try setting -S to something largish
> > > (10485760 or so) on the couchjs command line in your default.ini
> > >
> > >
> > > On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <donal.simmie@gmail.com
> > >wrote:
> > >
> > >> As an update I have tried numerous approaches to attempt to
> > fix/workaround
> > >> this problem:
> > >>
> > >> 1. Compacting the database.
> > >> 2. Replicating to a local copy of the DB and retrying view creation.
> > >> 3. Dumping DB contents to JSON with dump.py and loading into another
> DB
> > >> with load.py
> > >>
> > >> None of these worked.
> > >>
> > >> After downloading the couchdb-python library I added the python view
> > server
> > >> to Futon and ran view code in python and this does fix the problem.
> > >>
> > >> So if the problem is with the javascript view server, does this help
> in
> > >> identifying what the issue might be and how I could fix it?
> > >>
> > >> E.g.
> > >>
> > >> Bad entry in config file,
> > >> Corrupt document(s),
> > >> Something else??
> > >>
> > >> Thanks
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <donal.simmie@gmail.com
> > >> >wrote:
> > >>
> > >> > I am getting an os error on view creation for a certain database.
> All
> > my
> > >> > views for other databases are working but I cannot create any on
> this
> > one
> > >> > without it failing.
> > >> >
> > >> > The error message is: os_process_error,{exit_status,0}}
> > >> >
> > >> > I was trying a proper view but even this basic one is broken:
> > >> >
> > >> > function(doc) {
> > >> >   emit(1, doc);
> > >> > }
> > >> >
> > >> > Note:
> > >> > I have been using Futon for view creation.
> > >> > The all documents view is fine and documents themselves can be
> viewed.
> > >> > I altered the default configuration file by adding a compactions
> > section
> > >> > with the following key/value pair: -default: [{db_fragmentation,
> > "70%"},
> > >> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
> > >> > The DB in question contains 3.6 GB of data.
> > >> >
> > >> > Version: 1.2
> > >> > Os: Mac OS X 10.8.2
> > >> >
> > >> > The trace in the log file is available here:
> > >> http://pastebin.com/AdrJ6jeB
> > >> >
> > >> > Any suggestions please?
> > >> >
> > >>
> >
>

Re: View creation error on specific DB

Posted by Paul Davis <pa...@gmail.com>.
Well ain't that a knock in the teeth. Never seen that note before so it
must've been something lots of people were mistaking that API for.

I've got no idea how to fix this then.


On Mon, Jan 21, 2013 at 11:19 AM, Robert Newson <rn...@apache.org> wrote:

> Paul, you know that -S doesn't change the stack size just the size of
> stack fragments. It's a useless setting afaict;
>
> from
> https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_NewContext
>
> "The stackchunksize parameter does not control the JavaScript stack
> size. (The JSAPI does not provide a way to adjust the stack depth
> limit.) Passing a large number forstackchunksize is a mistake."
>
> B.
>
> On 21 January 2013 11:39, Paul Davis <pa...@gmail.com> wrote:
> > Sounds like a stack size issue. Try setting -S to something largish
> > (10485760 or so) on the couchjs command line in your default.ini
> >
> >
> > On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <donal.simmie@gmail.com
> >wrote:
> >
> >> As an update I have tried numerous approaches to attempt to
> fix/workaround
> >> this problem:
> >>
> >> 1. Compacting the database.
> >> 2. Replicating to a local copy of the DB and retrying view creation.
> >> 3. Dumping DB contents to JSON with dump.py and loading into another DB
> >> with load.py
> >>
> >> None of these worked.
> >>
> >> After downloading the couchdb-python library I added the python view
> server
> >> to Futon and ran view code in python and this does fix the problem.
> >>
> >> So if the problem is with the javascript view server, does this help in
> >> identifying what the issue might be and how I could fix it?
> >>
> >> E.g.
> >>
> >> Bad entry in config file,
> >> Corrupt document(s),
> >> Something else??
> >>
> >> Thanks
> >>
> >>
> >>
> >>
> >>
> >> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <donal.simmie@gmail.com
> >> >wrote:
> >>
> >> > I am getting an os error on view creation for a certain database. All
> my
> >> > views for other databases are working but I cannot create any on this
> one
> >> > without it failing.
> >> >
> >> > The error message is: os_process_error,{exit_status,0}}
> >> >
> >> > I was trying a proper view but even this basic one is broken:
> >> >
> >> > function(doc) {
> >> >   emit(1, doc);
> >> > }
> >> >
> >> > Note:
> >> > I have been using Futon for view creation.
> >> > The all documents view is fine and documents themselves can be viewed.
> >> > I altered the default configuration file by adding a compactions
> section
> >> > with the following key/value pair: -default: [{db_fragmentation,
> "70%"},
> >> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
> >> > The DB in question contains 3.6 GB of data.
> >> >
> >> > Version: 1.2
> >> > Os: Mac OS X 10.8.2
> >> >
> >> > The trace in the log file is available here:
> >> http://pastebin.com/AdrJ6jeB
> >> >
> >> > Any suggestions please?
> >> >
> >>
>

Re: View creation error on specific DB

Posted by Robert Newson <rn...@apache.org>.
Paul, you know that -S doesn't change the stack size just the size of
stack fragments. It's a useless setting afaict;

from https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_NewContext

"The stackchunksize parameter does not control the JavaScript stack
size. (The JSAPI does not provide a way to adjust the stack depth
limit.) Passing a large number forstackchunksize is a mistake."

B.

On 21 January 2013 11:39, Paul Davis <pa...@gmail.com> wrote:
> Sounds like a stack size issue. Try setting -S to something largish
> (10485760 or so) on the couchjs command line in your default.ini
>
>
> On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <do...@gmail.com>wrote:
>
>> As an update I have tried numerous approaches to attempt to fix/workaround
>> this problem:
>>
>> 1. Compacting the database.
>> 2. Replicating to a local copy of the DB and retrying view creation.
>> 3. Dumping DB contents to JSON with dump.py and loading into another DB
>> with load.py
>>
>> None of these worked.
>>
>> After downloading the couchdb-python library I added the python view server
>> to Futon and ran view code in python and this does fix the problem.
>>
>> So if the problem is with the javascript view server, does this help in
>> identifying what the issue might be and how I could fix it?
>>
>> E.g.
>>
>> Bad entry in config file,
>> Corrupt document(s),
>> Something else??
>>
>> Thanks
>>
>>
>>
>>
>>
>> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <donal.simmie@gmail.com
>> >wrote:
>>
>> > I am getting an os error on view creation for a certain database. All my
>> > views for other databases are working but I cannot create any on this one
>> > without it failing.
>> >
>> > The error message is: os_process_error,{exit_status,0}}
>> >
>> > I was trying a proper view but even this basic one is broken:
>> >
>> > function(doc) {
>> >   emit(1, doc);
>> > }
>> >
>> > Note:
>> > I have been using Futon for view creation.
>> > The all documents view is fine and documents themselves can be viewed.
>> > I altered the default configuration file by adding a compactions section
>> > with the following key/value pair: -default: [{db_fragmentation, "70%"},
>> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
>> > The DB in question contains 3.6 GB of data.
>> >
>> > Version: 1.2
>> > Os: Mac OS X 10.8.2
>> >
>> > The trace in the log file is available here:
>> http://pastebin.com/AdrJ6jeB
>> >
>> > Any suggestions please?
>> >
>>

Re: View creation error on specific DB

Posted by Paul Davis <pa...@gmail.com>.
Sounds like a stack size issue. Try setting -S to something largish
(10485760 or so) on the couchjs command line in your default.ini


On Mon, Jan 21, 2013 at 10:27 AM, Donal Simmie <do...@gmail.com>wrote:

> As an update I have tried numerous approaches to attempt to fix/workaround
> this problem:
>
> 1. Compacting the database.
> 2. Replicating to a local copy of the DB and retrying view creation.
> 3. Dumping DB contents to JSON with dump.py and loading into another DB
> with load.py
>
> None of these worked.
>
> After downloading the couchdb-python library I added the python view server
> to Futon and ran view code in python and this does fix the problem.
>
> So if the problem is with the javascript view server, does this help in
> identifying what the issue might be and how I could fix it?
>
> E.g.
>
> Bad entry in config file,
> Corrupt document(s),
> Something else??
>
> Thanks
>
>
>
>
>
> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <donal.simmie@gmail.com
> >wrote:
>
> > I am getting an os error on view creation for a certain database. All my
> > views for other databases are working but I cannot create any on this one
> > without it failing.
> >
> > The error message is: os_process_error,{exit_status,0}}
> >
> > I was trying a proper view but even this basic one is broken:
> >
> > function(doc) {
> >   emit(1, doc);
> > }
> >
> > Note:
> > I have been using Futon for view creation.
> > The all documents view is fine and documents themselves can be viewed.
> > I altered the default configuration file by adding a compactions section
> > with the following key/value pair: -default: [{db_fragmentation, "70%"},
> > {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
> > The DB in question contains 3.6 GB of data.
> >
> > Version: 1.2
> > Os: Mac OS X 10.8.2
> >
> > The trace in the log file is available here:
> http://pastebin.com/AdrJ6jeB
> >
> > Any suggestions please?
> >
>

Re: View creation error on specific DB

Posted by Robert Newson <rn...@apache.org>.
My guess is a very large document, too large to fit in the stack of
the couchjs process.

On 21 January 2013 11:27, Donal Simmie <do...@gmail.com> wrote:
> As an update I have tried numerous approaches to attempt to fix/workaround
> this problem:
>
> 1. Compacting the database.
> 2. Replicating to a local copy of the DB and retrying view creation.
> 3. Dumping DB contents to JSON with dump.py and loading into another DB
> with load.py
>
> None of these worked.
>
> After downloading the couchdb-python library I added the python view server
> to Futon and ran view code in python and this does fix the problem.
>
> So if the problem is with the javascript view server, does this help in
> identifying what the issue might be and how I could fix it?
>
> E.g.
>
> Bad entry in config file,
> Corrupt document(s),
> Something else??
>
> Thanks
>
>
>
>
>
> On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <do...@gmail.com>wrote:
>
>> I am getting an os error on view creation for a certain database. All my
>> views for other databases are working but I cannot create any on this one
>> without it failing.
>>
>> The error message is: os_process_error,{exit_status,0}}
>>
>> I was trying a proper view but even this basic one is broken:
>>
>> function(doc) {
>>   emit(1, doc);
>> }
>>
>> Note:
>> I have been using Futon for view creation.
>> The all documents view is fine and documents themselves can be viewed.
>> I altered the default configuration file by adding a compactions section
>> with the following key/value pair: -default: [{db_fragmentation, "70%"},
>> {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
>> The DB in question contains 3.6 GB of data.
>>
>> Version: 1.2
>> Os: Mac OS X 10.8.2
>>
>> The trace in the log file is available here: http://pastebin.com/AdrJ6jeB
>>
>> Any suggestions please?
>>

Re: View creation error on specific DB

Posted by Donal Simmie <do...@gmail.com>.
As an update I have tried numerous approaches to attempt to fix/workaround
this problem:

1. Compacting the database.
2. Replicating to a local copy of the DB and retrying view creation.
3. Dumping DB contents to JSON with dump.py and loading into another DB
with load.py

None of these worked.

After downloading the couchdb-python library I added the python view server
to Futon and ran view code in python and this does fix the problem.

So if the problem is with the javascript view server, does this help in
identifying what the issue might be and how I could fix it?

E.g.

Bad entry in config file,
Corrupt document(s),
Something else??

Thanks





On Thu, Jan 17, 2013 at 2:59 PM, Donal Simmie <do...@gmail.com>wrote:

> I am getting an os error on view creation for a certain database. All my
> views for other databases are working but I cannot create any on this one
> without it failing.
>
> The error message is: os_process_error,{exit_status,0}}
>
> I was trying a proper view but even this basic one is broken:
>
> function(doc) {
>   emit(1, doc);
> }
>
> Note:
> I have been using Futon for view creation.
> The all documents view is fine and documents themselves can be viewed.
> I altered the default configuration file by adding a compactions section
> with the following key/value pair: -default: [{db_fragmentation, "70%"},
> {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}].
> The DB in question contains 3.6 GB of data.
>
> Version: 1.2
> Os: Mac OS X 10.8.2
>
> The trace in the log file is available here: http://pastebin.com/AdrJ6jeB
>
> Any suggestions please?
>