Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couchdb - Is it possible to deactivate the reduce_overflow_error error

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.

like image 802
Arnaud Avatar asked Dec 26 '22 15:12

Arnaud


1 Answers

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.

like image 90
Kxepal Avatar answered Dec 29 '22 04:12

Kxepal