incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Views crash
Date Wed, 09 Feb 2011 10:41:26 GMT
One reason I can see for the view update taking so long is you have a
lot of views that emit the full 'doc' as the value. A lighter, faster
alternative is to emit null for the value and use ?include_docs=true
to get the doc at query time from the database file instead of the
view file.

That shouldn't be necessary though, and receiving this timeout means
it took a very long time to get a response. I read as much of your
view code as I could in the form above but didn't see anything
obviously contentious. If you could post your map/reduce functions in
a clearer form (i.e, without all the escaping), perhaps something will
stand out.

B.

On 9 February 2011 09:45, Dave Cottlehuber <dave@muse.net.nz> wrote:
> On 9 February 2011 06:20, Rob Pettefar <rpettefar@gpslsolutions.com> wrote:
>>  Hi guys
>> I have an issue with views crashing.
>> This has occurred on both Linux and Windows distributions of CouchDB 1.0.1
>
> Has this issue occurred on those platforms, on a previous version?
>
>> Sometimes the views for a particular database will break. In Futon they
>> appear unresponsive.
>> The only way round this that I have seen is to delete and rebuild the view
>> file for the database in question.
>>
>> This seems to happen more often on the Windows version but I don't think it
>> is anything to do with the >4Gb file issue.
>> Any help you could lend would be invaluable.
>>
>> Thanks
>> Rob
>>
>> I have included the error that was logged in the couchdb log file:
>>
>> [Fri, 21 Jan 2011 12:18:28 GMT] [debug] [<0.738.0>] Exit from linked pid:
>> {<0.742.0>,
>>                       {timeout,
>>                           {gen_server,call,
>>                               [couch_query_servers,
>>                                {get_proc,<<"javascript">>}]}}}
>>
>> [Fri, 21 Jan 2011 12:18:28 GMT] [error] [<0.738.0>] ** Generic server
>> <0.738.0> terminating
>> ** Last message in was {'EXIT',<0.742.0>,
>>                           {timeout,
>>                               {gen_server,call,
>>                                   [couch_query_servers,
>>                                    {get_proc,<<"javascript">>}]}}}
>> ** When Server state == {group_state,undefined,<<"testdb">>,
>>                         {"../var/lib/couchdb",<<"testdb">>,
>>                          {group,
>>                             [<<"npc">>],
>
> Hi Rob
>
> by no means am I am expert but it looks like this is a "normal"
> timeout in couch_query_servers.
>
>    ProcTimeout = list_to_integer(couch_config:get(
>                        "couchdb", "os_process_timeout", "5000")),
>
> If so you can try upping this from the default 5 seconds in local.ini:
>
> [couchdb]
> os_process_timeout = 5000 ; 5 seconds. for view and external servers.
>
> & restart.
>
> The more important question is - why should these views take so long to process?
>
> A+
> Dave
>

Mime
View raw message