incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark James Adams" <mark.james.li...@gmail.com>
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):
{{badmatch,{error,error_header_too_large}},
                        [{couch_view,update_loop,5}]}
[error] [emulator] Error in process <0.88.0> with exit value:
{{badmatch,{error,error_header_too_large}},[{couch_view,update_loop,5}]}

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
http://markmail.org/message/2t7dzxiy7ruyxxdz . 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.

Thanks.

-- 
Mark James Adams
http://raysend.com/mark/

Mime
View raw message