Running ViewQuery with more then 49 keys fails

Server 3.0.2-1603

CouchbaseError: The object requested is too big to store in the server
at Bucket._viewReq (/opt/kandy/DAL/node_modules/couchbase/lib/bucket.js:476:12)
at Bucket._invoke (/opt/kandy/DAL/node_modules/couchbase/lib/bucket.js:813:8)
at Bucket._maybeInvoke (/opt/kandy/DAL/node_modules/couchbase/lib/bucket.js:832:10)
at Bucket._view (/opt/kandy/DAL/node_modules/couchbase/lib/bucket.js:524:8)
at Bucket.query (/opt/kandy/DAL/node_modules/couchbase/lib/bucket.js:717:17)

I believe you’re running into this error due to the query length limit which raises this error when the full length of the query options serialised as url encoded variables exceeds 2048 characters. There is a workaround which suggests sending the list of keys, or other long fields, as POST data in the view query request, however, this does not appear to be supported by the Node.js SDK. I opened a topic on this subject several days ago.

Hey @alonspiegel,

I will be looking into switching Node.js to using the POST method to avoid this limitation in the future.

Cheers, Brett

Thank you guys,
I would love to know in which client version this fix will be released.


Hi there, I have the same issue with 2.2.1 , any workaround (other can split into XX call to query ?)