couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark James Adams" <>
Subject error_header_too_large from view using reduce
Date Fri, 18 Jul 2008 10:34:51 GMT
[info] [<0.75.0>] HTTP Error (code 500):
[error] [emulator] Error in process <0.88.0> with exit value:

I'm seeing the above error with one of my views. It was working fine
before when only a dozen rows were being returned, but now I'm up to
about 250. The documents are not large, either. At this point each key
is matching between 1 and 5 documents.

If I remove the reduce function it works fine.

I also see that this problem has been reported before . Is there a work around?

The view function looks like

"map": "function(doc) { if(doc.user != null) { emit(doc.user, doc);}}",
"reduce": "function(keys, values) {return values.sort(function(a,b)
{return new Date(b.created_at) - new Date(a.created_at)})[0]}"

The point of the view is to show the most recent version of
information about each user.


Mark James Adams

View raw message