couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "william kinney" <william.kin...@gmail.com>
Subject Re: view access keeps timing out
Date Thu, 11 Sep 2008 19:31:34 GMT
I simplified the map function to:

function(doc) {
  emit(doc._id, doc);
}

and with count=3&update=false it is still timing out. I'm not sure what is
going on. I forgot to mention, the server is a vmware image...but I don't
think that has anything do it with it (unless the disk io is being mangled
by vmware?).

I have another database of 5000 records, and it's not having an issue in
accessing some of the views, even after some updates. Could it be something
in the data that is making the views fail?

The only difference I can see between the two databases is that the one that
is failing I created the views after inserting all 10k documents, the 5k it
was before and somewhat incrementally updated as it grew.

I suppose I'll try populating another database of 10k docs and see what
happens.

I wish there was a way I could see how the view is progressing, other than
requesting and waiting.

Thanks,
Will

On Thu, Sep 11, 2008 at 1:44 PM, Jeremy Wall <jwall@google.com> wrote:

> are you trying to return all of the documents at once? does it improve if
> you restrict the results with a count=100 or similar? I can possibly see a
> scenario where it might time out just trying to server several thousand
> documents to you at once. CouchDB doesn't exactly stream the documents to
> you one at a time like a sql database might.
>
> On Thu, Sep 11, 2008 at 12:11 PM, william kinney
> <william.kinney@gmail.com>wrote:
>
> > thanks for those! I was googling trying to find example reduce functions,
> > in
> > vain.
> >
> > It seems my view (w/ reduce function removed) is still timing out.
> > curl: (52) Empty reply from server
> >
> > real    85m15.699s
> >
> > I'm not sure what's going on. The map function isn't that complicated.
> Any
> > ideas on how I could find out what's going on?
> >
> > Thanks,
> > Will
> >
> >
> > On Thu, Sep 11, 2008 at 1:08 AM, Chris Anderson <jchris@grabb.it> wrote:
> >
> > > On Wed, Sep 10, 2008 at 7:25 PM, william kinney
> > > <william.kinney@gmail.com> wrote:
> > > > reduce function:
> > > > function(keys, values) {
> > > >  return values;
> > > > }
> > > >
> > >
> > > The problem is with your reduce function (and the existing
> > > documentation for reduce, which should make this clear, but doesn't).
> > >
> > > Reduce should only be used to emit scalar values. In your case, you
> > > would be better not to define a reduce function at all, and just query
> > > the map with startkey and endkey ranges. For example reduce functions,
> > > see couch_tests.js's reduce test here:
> > >
> > >
> > >
> >
> http://svn.apache.org/repos/asf/incubator/couchdb/trunk/share/www/script/couch_tests.js
> > >
> > > There are also some examples in various blog posts I've written about
> > > reduce:
> > >
> > > Google search for those posts: http://tinyurl.com/couchdb-reduce
> > >
> > > Hope this helps!
> > >
> > > Chris
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Chris Anderson
> > > http://jchris.mfdz.com
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message