3.13. Miscellaneous Parameters

3.13.1. Configuration of Attachment Storage


Defines zlib compression level for the attachments from 1 (lowest, fastest) to 9 (highest, slowest). A value of 0 disables compression:

compression_level = 8

Since compression is ineffective for some types of files, it is possible to let CouchDB compress only some types of attachments, specified by their MIME type:

compressible_types = text/*, application/javascript, application/json, application/xml

3.13.2. Statistic Calculation


Interval between gathering statistics in seconds:

interval = 10

3.13.3. UUIDs Configuration


Changed in version 1.3: Added utc_id algorithm.

CouchDB provides various algorithms to generate the UUID values that are used for document _id’s by default:

algorithm = sequential

Available algorithms:

  • random: 128 bits of random awesome. All awesome, all the time:

        "uuids": [
  • sequential: Monotonically increasing ids with random increments. The first 26 hex characters are random, the last 6 increment in random amounts until an overflow occurs. On overflow, the random prefix is regenerated and the process starts over.

        "uuids": [
  • utc_random: The time since Jan 1, 1970 UTC, in microseconds. The first 14 characters are the time in hex. The last 18 are random.

        "uuids": [
  • utc_id: The time since Jan 1, 1970 UTC, in microseconds, plus the utc_id_suffix string. The first 14 characters are the time in hex. The uuids/utc_id_suffix string value is appended to these.


Impact of UUID choices: the choice of UUID has a significant impact on the layout of the B-tree, prior to compaction.

For example, using a sequential UUID algorithm while uploading a large batch of documents will avoid the need to rewrite many intermediate B-tree nodes. A random UUID algorithm may require rewriting intermediate nodes on a regular basis, resulting in significantly decreased throughput and wasted disk space space due to the append-only B-tree design.

It is generally recommended to set your own UUIDs, or use the sequential algorithm unless you have a specific need and take into account the likely need for compaction to re-balance the B-tree and reclaim wasted space.


New in version 1.3.

The utc_id_suffix value will be appended to UUIDs generated by the utc_id algorithm. Replicating instances should have unique utc_id_suffix values to ensure uniqueness of utc_id ids.

utc_id_suffix = my-awesome-suffix

New in version 1.5.1.

No more than this number of UUIDs will be sent in a single request. If more UUIDs are requested, an HTTP error response will be thrown.

max_count = 1000

3.13.4. Vendor information


New in version 1.3.

CouchDB distributors have the option of customizing CouchDB’s welcome message. This is returned when requesting GET /.

name = The Apache Software Foundation
version = 1.5.0

3.13.5. Content-Security-Policy


Experimental support of CSP Headers for /_utils (Fauxton).


Enable the sending of the Header Content-Security-Policy:

enable = true

You can change the default value for the Header which is sent:

header_value = default-src 'self'; img-src *; font-src *;

3.13.6. Configuration of Database Purge


New in version 3.0.

Sets the maximum number of documents allowed in a single purge request:

max_document_id_number = 100

New in version 3.0.

Sets the maximum number of accumulated revisions allowed in a single purge request:

max_revisions_number = 1000

New in version 3.0.

Sets the allowed duration when index is not updated for local purge checkpoint document. Default is 24 hours:

index_lag_warn_seconds = 86400