incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuuki Takano" <ytak...@jaist.ac.jp>
Subject Re: couchDB gave up building views
Date Tue, 21 Oct 2008 09:38:22 GMT
of cource,

document:
{"_id":"0001be07fbf3cebd129acb6b2d57896a",
 "_rev":"2343492783",
 "date":1.22456723829709005356e+09,
 "type":"vote",
 "service":"ml1",
 "user":"627",
 "item":"1135",
 "rate":3,
 "_revs_info":[{"rev":"2343492783","status":"available"}]}

map func:
function(doc) {
  if (doc.type == 'vote')
    emit([doc.service, doc.user, doc.item], doc);
}


no reduce



2008/10/21 Chris Anderson <jchris@apache.org>:
> can you post an example document and map function? there's no reason
> they should be taking so long.
>
> On Tue, Oct 21, 2008 at 1:21 AM, Yuuki Takano <ytakano@jaist.ac.jp> wrote:
>> So I read a source of couchDB, I understood why my map functions were
>> considered they have bugs.
>>
>> readline/2 function in couch_query_servers.erl reads and waits data
>> from Port connected to the couchjs,
>> and it give up waiting after 5 seconds.
>> This means couchDB cannot build views if couchjs cannot send data in 5 seconds.
>>
>> In my situation, my map functions failed despite it work well when
>> there is a few document because of the reason above.
>> So, I changed hardcoded timeout seconds 5000 to 50000 and reinstall couchDB.
>> Then, my map functions work well.
>>
>>
>> Thank you for your comments.
>>
>>
>> 2008/10/21 Yuuki Takano <ytakano@jaist.ac.jp>:
>>> Thank you very much.
>>>
>>>> One, your HTTP request should block until the view returns. If the
>>>> HTTP request times out you can just try again, or notify your user, or
>>>> what ever is appropriate.
>>>
>>> OK.
>>> I underdtand, tank you!
>>> I'll try it later.
>>>
>>>
>>>> The error that you received about the timeout in couch means your map
>>>> functions have a bug that is preventing them from returning data to
>>>> couch. Aftering fixing that issue, things should work smoothly.
>>>
>>> My map functions work well when there is a few document.
>>>
>>>
>>>
>>>> I'm guessing you are on an old version of Erlang. Build erlang from the latest
source at erlang.org
>>>
>>> Thank you, but I use the earliest version of Erlang (v5.6.4).
>>>
>>>
>>> 2008/10/20 Damien Katz <damien@apache.org>:
>>>> I'm guessing you are on an old version of Erlang. Build erlang from the
>>>> latest source at erlang.org
>>>>
>>>> -Damien
>>>>
>>>>
>>>> On Oct 20, 2008, at 9:07 AM, Yuuki Takano wrote:
>>>>
>>>>> Hi there,
>>>>>
>>>>> I inserted 20,000 documents into couchDB, and looked up views of it.
>>>>> However , couchDB gave up building views because of timed out.
>>>>>
>>>>> The views were quite simple, such as
>>>>>
>>>>> function(doc) {
>>>>>   if (doc.type == 'vote') {
>>>>>       emit([doc.service, doc.user, doc.item], doc);
>>>>>   }
>>>>> }
>>>>>
>>>>> It seems that couchDB does not support many documents at this version
>>>>> (0.8.1).
>>>>> Is that right?
>>>>>
>>>>> Regards,
>>>>>
>>>>> -- Yuuki Takano <ytakano@jaist.ac.jp>
>>>>
>>>>
>>>
>>
>
>
>
> --
> Chris Anderson
> http://jchris.mfdz.com
>

Mime
View raw message