Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couchbase 2.2.0 document size editing limit

Tags:

couchbase

People also ask

What is the maximum size of a document in couchbase?

Official docs say that limit is 20 Mbytes. It's only limitation for couchbase admin's web gui.

How do I find the size of a document in couchbase?

You can use the couch_dbdump command (in /opt/couchbase/bin ) to dump the couchstore files on disk - that will show you the "real" size and compressed size for each document.

What type of database is couchbase?

Couchbase is an award-winning distributed NoSQL cloud database. It delivers unmatched versatility, performance, scalability, and financial value across cloud, on-premises, hybrid, distributed cloud, and edge computing deployments.

How is data stored in couchbase?

The data is stored in a Couchbase cluster using buckets. Buckets are isolated, virtual containers which logically group records within a cluster. A bucket is the equivalent of a database. They provide a secure mechanism for organizing, managing and analyzing data storage.


You can raise the limit or disable completely on version 2.2:

To raise the limit;

edit file: /opt/couchbase/lib/ns_server/erlang/lib/ns_server/priv/public/js/documents.js

at line 214:

var DocumentsSection = {

  docsLimit: 1000,

  docBytesLimit: 2500,

init: function () {

var self = this;

Edit the docBytesLimit variable set to 2500 and increase it to your preferred value.

To disable completely;

You can comment out the conditional statement and return a false value. At line 362 comment out the statement and return false:

function isJsonOverLimited(json) {
  //return getStringBytes(json) > self.docBytesLimit;
  return false;
}

Hope this helps.. There are limitations as to how much your WYSYWIG editor can handle. So please be careful and as always editing core files can have negative results. We did it on our system and it works for us.


for Mac OSX, u can edit

/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/lib/ns_server/erlang/lib/ns_server/priv/public/js/documents.js

It seems that the UI code will actually make the request and get the document back, but then refuse to show it if it's too big. So, you can actually just open up the browser developer tools, find the request for the document you want in the network traffic, and the document itself is right there in the response. Copy-paste into a pretty-printer, and you're done.