4

I am working on a map/reduce that doesn't return exactly what I am expecting in rereduce cases.

I'd like to debug it but I at least want too see what's in it, so I output a lot of things and Couch returns with a reduce_overflow_error each time I run the view.

Is it possible to deactivate this behavior?

I know this is here to prevent developers doing unhealthy views, but if I want to do crap, shouldn't I be allowed to? Especially when debugging.

Arnaud
  • 1,121
  • 1
  • 11
  • 26

1 Answers1

10

You need to modify CouchDB config to disable this restriction.

First way via curl:

curl -X PUT http://localhost:5984/_config/query_server_config/reduce_limit -d '"false"' -H "Content-Type: application/json"

Second is via local.ini config modification. Just add or modify section as shown below and restart CouchDB service:

[query_server_config]
reduce_limit = false

Third one is through Futon Configuration page. I suppose, you'd already guessed what parameter should be modified there(;

But is most cases this restriction is reasonable since reduce function should reduce output, not make it bigger - that's map function work. For debugging reasons better to enable debug logs - they are really detailed and may show map/reduce/any function output.

Ellis Percival
  • 4,632
  • 2
  • 24
  • 34
Kxepal
  • 4,659
  • 1
  • 19
  • 16
  • 1
    Holy guacamole! I've searched for 'overflow' and 'error' into the Futon Configuration page but never thought of 'limit'. Next time I want debugging I'll try the logs, thanks for the tips. – Arnaud Oct 29 '12 at 12:14