Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 57026 invoked from network); 20 Oct 2008 14:36:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Oct 2008 14:36:06 -0000 Received: (qmail 64788 invoked by uid 500); 20 Oct 2008 14:36:08 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 64358 invoked by uid 500); 20 Oct 2008 14:36:07 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 64347 invoked by uid 99); 20 Oct 2008 14:36:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2008 07:36:07 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.92.146 as permitted sender) Received: from [74.125.92.146] (HELO qw-out-1920.google.com) (74.125.92.146) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2008 14:34:56 +0000 Received: by qw-out-1920.google.com with SMTP id 4so808097qwk.54 for ; Mon, 20 Oct 2008 07:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=391cCgD7I1UUDP0B1Gi5VCVQQ/hGA4T5Xasg4kjuG+I=; b=Cu+D+AC/TLX+blUhQQ0gYQfvt30olvtkwqAzFgONNEW3K6CK5jyr0VeX+FuGmdY/fN vPJ486eD/o7DPxfruLCDio44Bo0H9T7q2P5y8scHswbu5XwNXav/gSfRNR9GXMtYQtiH VUkVHIKT6mW3egEOWwoQL7WQKSEJ5ib9gV/vA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=qldwNfpsOz4bQ5jsT51E2Vey9FT15jJcNTC8Ayx0zURdmopydPhcm0F4qX1hly6njV C9rI5ZtoE6x53l8njPkdlm2n5rjk+mgf+mdwV1CaHUKeMvrrAXMq0uY2b8i4hNlJcQ7b e/9hPeky1TsgSjVH7utaZtEJmu3u1P/3ERDc4= Received: by 10.215.41.20 with SMTP id t20mr10670977qaj.22.1224513324225; Mon, 20 Oct 2008 07:35:24 -0700 (PDT) Received: by 10.214.215.21 with HTTP; Mon, 20 Oct 2008 07:35:24 -0700 (PDT) Message-ID: Date: Mon, 20 Oct 2008 10:35:24 -0400 From: "Paul Davis" To: couchdb-user@incubator.apache.org Subject: Re: couchDB gave up building views In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5e0220e30810200617y3c304225l6715e69a6da534d2@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Oct 20, 2008 at 10:31 AM, Yuuki Takano wrote: > Thank you for your responses. > > I looked up views such as > /_view/votes/votes?count=3D10&group=3Dtrue > >> Yeah, that means your map function took too long to complete a map >> operation. (5 seconds IIRC). If your map functions are taking that >> long you should reexamine them. (That's per group of docs sent, not >> the entire operation mind you) > > This means I have to look up "/_view/votes/votes?count=3D10&group=3Dtrue" > repeatedly until receiving valid responses. > After repeating reasonable times, I can get responses I want. > Is that right? > 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. The first time you query the view, it will try start a process that irregardless of subsequence requests, will build the entire view. 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. HTH, Paul > > > 2008/10/20 Paul Davis : >> Yeah, that means your map function took too long to complete a map >> operation. (5 seconds IIRC). If your map functions are taking that >> long you should reexamine them. (That's per group of docs sent, not >> the entire operation mind you) >> >> Paul >> >> On Mon, Oct 20, 2008 at 9:47 AM, Yuuki Takano wrot= e: >>> Thank you for your quick response. >>> >>> When I looking up views, the process "couchjs" is running and takes >>> 90% of CPU resources. >>> However, that process stop after receiving following response. >>> >>> {"error":"error","reason":"{{nocatch,{map_process_error,\"map function >>> timed out\"}}, >>> [{couch_query_servers,readline,2}, >>> {couch_query_servers,read_json,1}, >>> {couch_query_servers,prompt,2}, >>> {couch_query_servers,'-rereduce\/3-fun-0-',3}, >>> {lists,zipwith,3},\n {couch_query_servers,rereduce,3}, >>> {couch_view,'-init_group\/4-fun-0-',4}, >>> {couch_btree,'-write_node\/3-lc$^0\/1-0-',3}]}"} >>> >>> So, I think couchDB gave up building views despite it had to continue. >>> >>> >>> 2008/10/20 Paul Davis : >>>> Also, i think there's work on a patch to be able to query couch on the >>>> status of view generation. If not, sorry to get your hopes up. >>>> >>>> Paul >>>> >>>> On Mon, Oct 20, 2008 at 9:17 AM, Ed Finkler wrot= e: >>>>> What's probably timing out is your http request, not the view >>>>> building. Views with a large number of docs can take a while to build >>>>> initially, but the build process will continue even if your request >>>>> times out. Typically I keep an eye on the cpu usage on the couchjs >>>>> process(es) to see when it calms down =96 that usually means the buil= d >>>>> is done. >>>>> >>>>> -- >>>>> Ed Finkler >>>>> http://funkatron.com >>>>> AIM: funka7ron >>>>> ICQ: 3922133 >>>>> Skype: funka7ron >>>>> >>>>> >>>>> On Mon, Oct 20, 2008 at 9:07 AM, Yuuki Takano w= rote: >>>>>> 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 =3D=3D 'vote') { >>>>>> emit([doc.service, doc.user, doc.item], doc); >>>>>> } >>>>>> } >>>>>> >>>>>> It seems that couchDB does not support many documents at this versio= n (0.8.1). >>>>>> Is that right? >>>>>> >>>>>> Regards, >>>>>> >>>>>> -- Yuuki Takano >>>>>> >>>>> >>>> >>> >> >