I am unable to upload large documents in couchDB. I am using Node.js to upload with help of ActiveMQ. Small documents are uploading. I tried to upload a document which is 30 MB, but it failed with the following exception:
(node:28) UnhandledPromiseRejectionWarning: Error: document_too_large
at Request._callback (/app/node_modules/**/multitenant/node_modules/nano/lib/nano.js:151:15)
at Request.self.callback (/app/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/app/node_modules/request/request.js:1154:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/app/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:28) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:28) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The answer is right there on the first line of the error stack
The default maximum document size for couchDB is 8000000 bytes which is far below 30mb.
FWIW 30mb is a lot of data, are you certain the data shouldn't be an attachment? See this related SO Q/A.