Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the CouchDB 3.0 8MB limit per document, include the attachments to the document?

Tags:

couchdb

I'm planning a new project, using CouchDB 3.0 as the database. Each document will have one or more attachment. I want to stick with the CouchDB defaults as much as possible. My concern is that the document size of 8MB includes the attachment to that document.

In the upgrade notes of the 3.0.x Branch it states the following:

The default maximum document size has been reduced to 8MB. This means that databases with larger documents will not be able to replicate into CouchDB 3.0 correctly without modification. This change has been made in preparation for anticipated hard upper limits on document size imposed by CouchDB 4.0. For 3.x, the max document size setting can be relaxed via the [couchdb] max_document_size config setting.

Can someone please confirm the attachment size limits in relation to the document size limits.

like image 509
TuinBoy Avatar asked Jan 25 '23 07:01

TuinBoy


1 Answers

The max_document_size configuration parameter applies only to documents, not attachments.

This is made clear in the the 3.0 documentation regarding the configuration parameter max_document_size

Limit maximum document body size. Size is calculated based on the serialized Erlang representation of the JSON document body, because that reflects more accurately the amount of storage consumed on disk. In particular, this limit does not include attachments.

Emphasis added

like image 179
RamblinRose Avatar answered Apr 06 '23 06:04

RamblinRose