Is it possible to deactivate the reduce_overflow_error error?

I am working on a map / abbreviation that does not return exactly what I expect in reuse cases.

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

Can this behavior be disabled?

I know it's here to prevent developers from making unhealthy looks, but if I want to do shit, am I not allowed? Especially when debugging.

+4
source share
1 answer

You need to reconfigure CouchDB to disable this restriction.

The first way using curl:

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

The second is through a modification of the local.ini configuration. Just add or change the section as shown below and restart the CouchDB service:

 [query_server_config] reduce_limit = false 

The third is through the Futon configuration page. I suppose you already guessed which parameter should be changed there (;

But in most cases, this restriction is reasonable, since the reduction function should reduce the output, and not increase it - work with the display function. For debugging reasons, it is better to enable debug logs - they are really detailed and can display the display / decrease / output of any function.

+8
source

Source: https://habr.com/ru/post/1339937/


All Articles