Skip to content

Commit

Permalink
Set the recbuf to avoid CouchDB erroring on long requests
Browse files Browse the repository at this point in the history
This used to work in CouchDB < 2.3, but we now need to set this
manually, otherwise our app will error in endless weird ways.

262144 is picked because I think it was the default before that.

See:
 - https://github.com/medic/medic-infrastructure/issues/47
 - #5083
  • Loading branch information
Stefan du Fresne committed Dec 21, 2018
1 parent 2763c05 commit f297fc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ module.exports = function(grunt) {
' -H "Content-Type: application/json" ' +
` -d '{"_id": "org.couchdb.user:${couchConfig.username}", "name": "${couchConfig.username}", "password":"${couchConfig.password}", "type":"user", "roles":[]}' ` +
` && curl -X PUT --data '"true"' ${couchConfig.withPath('_node/' + COUCH_NODE_NAME + '/_config/chttpd/require_valid_user')}` +
` && curl -X PUT --data '"[{recbuf, 262144}]"' ${couchConfig.withPath('_node/' + COUCH_NODE_NAME + '/_config/chttpd/server_options')}` +
` && curl -X PUT --data '"4294967296"' ${couchConfig.withPath('_node/' + COUCH_NODE_NAME + '/_config/httpd/max_http_request_size')}`,
},
'reset-test-databases': {
Expand Down

0 comments on commit f297fc6

Please sign in to comment.