how do I store a document which is more than 20Mb size in our case the document size it around 27Mb which is actually a C# object which we are trying to store it in couchbase.
Hi, With the current release we don’t support objects larger than 20MB in size. Is the object binary or just happen to be a very large JSON?
Few workarounds: You can try to compress the item yourself if the data can benefit from it before storing. Or you can break the object up into multiple pieces.
thanks
-cihan
Its a C# object converted to JSON object which when we try to store it throws an exception of it being large object. Mongodb has something called GRIDFS. Does couchbase also has something similar for .Net
We do not have the same facility in couchbase today. you can store data in the filesystem/blob store in the cloud and reference it for sure but your app will need to manage that.
thanks
-cihan
Thank you for clearing this up.
What’s the difference in behaviour if the object is binary or json?
There’s no difference in behavior, but if it’s binary then you’re already unable to use services such as N1QL and Views. Thus, either you (in your application) or the SDK may compress the binary value on your behalf.
@ingenthr @subhashni I experienced quite a strange thing. I had a java list of about 70 MB in size. When I am saving this list in the Couchbase cache (I am using Couchbase for caching through Spring), it shrinks the list to 20MB and saves it. When I retrieve the list form the cache, it expands it to 70MB again. The list saved into the cache and the one retrieved from the cache are ditto same, no truncation/corruption of data. Is there some internal compaction logic because I was expecting a “Request size too big” exception.
P.S. I am storing binary data.
My bad. The actual size is not > 20 MB, but 19 MB. The size of byte array is 19 MB for a text file of 70 MB.