簡體   English   中英

無法在 couchDB 中插入大文檔

[英]Unable to insert large document in couchDB

我無法在 couchDB 中上傳大型文檔。 我正在使用 Node.js 在 ActiveMQ 的幫助下上傳。 小文件正在上傳。 我嘗試上傳一個 30 MB 的文檔,但失敗並出現以下異常:

(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.

答案就在錯誤堆棧的第一行

(節點:28)UnhandledPromiseRejectionWarning:錯誤:document_too_large

couchDB 的默認最大文檔大小為 8000000 字節,遠低於 30mb。

FWIW 30mb 是很多數據,你確定這些數據不應該是附件嗎? 請參閱此相關 SO Q/A

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM