183af9a01SJan Lehnardt; @configure_input@
283af9a01SJan Lehnardt
383af9a01SJan Lehnardt; Upgrading CouchDB will overwrite this file.
483af9a01SJan Lehnardt
53751c132SJan Lehnardt[couchdb]
6c6a29006STrond Norbyedatabase_dir = @abs_top_builddir@/tmp/lib
7c6a29006STrond Norbyeview_index_dir = @abs_top_builddir@/tmp/lib
8c6a29006STrond Norbyeutil_driver_dir = @abs_top_builddir@/src/couchdb/priv
902b50afdSJohn Christopher Andersondelayed_commits = true ; set this to false to ensure an fsync before 201 Created is returned
10c6a29006STrond Norbyeuri_file = @abs_top_builddir@/tmp/run/couch.uri
11ec7ca1caSFilipe David Manana; Maximum number of distinct view update/building processes at any point in time.
12ec7ca1caSFilipe David Mananamax_parallel_indexers = 4
134812813fSFilipe David Borba Mananamax_parallel_replica_indexers = 2
14fb6316e6SVolker Mischemax_parallel_spatial_indexers = 4
15fbdd4abcSAaron Millerconsistency_check_precompacted = false
16fbdd4abcSAaron Millerconsistency_check_compacted = false
17e6bcd6e3SFilipe David Borba Manana; Maximum period for which we attempt to retry file operations on Windows.
18e6bcd6e3SFilipe David Borba Mananawindows_file_op_retry_period = 5000
1983af9a01SJan Lehnardt
207d86d0b7SFilipe David Borba Manana[database_compaction]
217d86d0b7SFilipe David Borba Manana; larger buffer sizes can originate smaller files
227d86d0b7SFilipe David Borba Mananadoc_buffer_size = 524288 ; value in bytes
237d86d0b7SFilipe David Borba Mananacheckpoint_after = 5242880 ; checkpoint after every N bytes were written
247d86d0b7SFilipe David Borba Manana
253751c132SJan Lehnardt[httpd]
263751c132SJan Lehnardtport = 5984
27f7298f32Sharshaip4_bind_address =
28f7298f32Sharshaip6_bind_address = ::1
29d6f27435SFilipe David Borba Mananaauthentication_handlers =
30c5e00c41SPaul Joseph Davisdefault_handler = {couch_httpd_db, handle_request}
3183b5c1c4SJan Lehnardtallow_jsonp = false
32413ddf8dSAliaksey Kandratsenkadb_frontend = couch_db_frontend
33ac02c7bdSFilipe David Borba Manana; Options for the MochiWeb HTTP server.
34ac02c7bdSFilipe David Borba Manana;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
35ac02c7bdSFilipe David Borba Manana; For more socket options, consult Erlang's module 'inet' man page.
36ac02c7bdSFilipe David Borba Manana;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
3783af9a01SJan Lehnardt
384b0948ddSRobert Newson[ssl]
394b0948ddSRobert Newsonport = 6984
404b0948ddSRobert Newson
413751c132SJan Lehnardt[log]
42c6a29006STrond Norbyefile = @abs_top_builddir@/tmp/log/couch.log
433751c132SJan Lehnardtlevel = info
44e8b722e2SAdam Kocoloskiinclude_sasl = true
4583af9a01SJan Lehnardt
4687476b2eSDamien F. Katz[daemons]
4787476b2eSDamien F. Katzview_manager={couch_view, start_link, []}
489e9f1dc2SVolker Mischeset_view_manager={couch_set_view, start_link, [prod, mapreduce_view]}
499e9f1dc2SVolker Mischeset_view_manager_dev={couch_set_view, start_link, [dev, mapreduce_view]}
50f5dc4c0fSFilipe David Borba Mananaindex_merger_pool={lhttpc_manager, start_link, [[{connection_timeout, 90000}, {pool_size, 10000}, {name, couch_index_merger_connection_pool}]]}
5187476b2eSDamien F. Katzquery_servers={couch_query_servers, start_link, []}
5287476b2eSDamien F. Katzhttpd={couch_httpd, start_link, []}
539b78e155SAdam Kocoloskiuuids={couch_uuids, start, []}
54aa8af247SFilipe David Borba Mananacouch_set_view_ddoc_cache={couch_set_view_ddoc_cache, start_link, []}
559198a5dfSFilipe David Borba Mananareplication_manager={couch_replication_manager, start_link, []}
56578c5595SFilipe David Mananacompaction_daemon={couch_compaction_daemon, start_link, []}
5782d31aa2SDamien F. Katz
5882d31aa2SDamien F. Katz[httpd_global_handlers]
5982d31aa2SDamien F. Katz/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
605dd96d8eSDamien F. Katz_active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}
613b80357aSFilipe David Manana_view_merge = {couch_httpd_view_merger, handle_req}
62a274da32SFilipe David Borba Manana_set_view = {couch_set_view_http, handle_req}
6382d31aa2SDamien F. Katz
6482d31aa2SDamien F. Katz[httpd_db_handlers]
65f6fd760cSJohn Christopher Anderson_view_cleanup = {couch_httpd_db, handle_view_cleanup_req}
66f34bf64cSPaul Joseph Davis_compact = {couch_httpd_db, handle_compact_req}
67610064aeSJohn Christopher Anderson_design = {couch_httpd_db, handle_design_req}
68b3b10304SChris Anderson_changes = {couch_httpd_db, handle_changes_req}
6939fb8f33SJohn Christopher Anderson
70610064aeSJohn Christopher Anderson[httpd_design_handlers]
71610064aeSJohn Christopher Anderson_view = {couch_httpd_view, handle_view_req}
72f6fd760cSJohn Christopher Anderson_info = {couch_httpd_db,   handle_design_info_req}
739b78e155SAdam Kocoloski
749b78e155SAdam Kocoloski[uuids]
759b78e155SAdam Kocoloski; Known algorithms:
769b78e155SAdam Kocoloski;   random - 128 bits of random awesome
779b78e155SAdam Kocoloski;     All awesome, all the time.
789b78e155SAdam Kocoloski;   sequential - monotonically increasing ids with random increments
799b78e155SAdam Kocoloski;     First 26 hex characters are random. Last 6 increment in
809b78e155SAdam Kocoloski;     random amounts until an overflow occurs. On overflow, the
819b78e155SAdam Kocoloski;     random prefix is regenerated and the process starts over.
829b78e155SAdam Kocoloski;   utc_random - Time since Jan 1, 1970 UTC with microseconds
839b78e155SAdam Kocoloski;     First 14 characters are the time in hex. Last 18 are random.
849c3377b0SJohn Christopher Andersonalgorithm = sequential
854ddb7554SPaul Joseph Davis
86a91a4fe1SAdam Kocoloski[replicator]
8777962e9bSFilipe David Borba Mananadb = _replicator
884f8cc1bcSFilipe David Borba Manana; Maximum replicaton retry count can be a non-negative integer or "infinity".
89928853c3SFilipe David Borba Mananamax_replication_retry_count = 10
9034eb4175SFilipe David Borba Manana; More worker processes can give higher network throughput but can also
9134eb4175SFilipe David Borba Manana; imply more disk and network IO.
9234eb4175SFilipe David Borba Mananaworker_processes = 4
9334eb4175SFilipe David Borba Manana; With lower batch sizes checkpoints are done more frequently. Lower batch sizes
9434eb4175SFilipe David Borba Manana; also reduce the total amount of used RAM memory.
95b4e9223fSFilipe David Mananaworker_batch_size = 500
961f2325e0SFilipe David Manana; Maximum number of HTTP connections per replication.
9734eb4175SFilipe David Borba Mananahttp_connections = 20
9834eb4175SFilipe David Borba Manana; HTTP connection timeout per replication.
9934eb4175SFilipe David Borba Manana; Even for very fast/reliable networks it might need to be increased if a remote
10034eb4175SFilipe David Borba Manana; database is too busy.
10134eb4175SFilipe David Borba Mananaconnection_timeout = 30000
102ff0952b7SFilipe David Manana; If a request fails, the replicator will retry it up to N times.
103a672a1ddSDamien Katzretries_per_request = 2
10434eb4175SFilipe David Borba Manana; Some socket options that might boost performance in some scenarios:
10534eb4175SFilipe David Borba Manana;       {nodelay, boolean()}
10634eb4175SFilipe David Borba Manana;       {sndbuf, integer()}
10734eb4175SFilipe David Borba Manana;       {recbuf, integer()}
10834eb4175SFilipe David Borba Manana;       {priority, integer()}
10934eb4175SFilipe David Borba Manana; See the `inet` Erlang module's man page for the full list of options.
11034eb4175SFilipe David Borba Mananasocket_options = [{keepalive, true}, {nodelay, false}]
111d48a657bSFilipe David Borba Manana; set to true to validate peer certificates
112d48a657bSFilipe David Borba Mananaverify_ssl_certificates = false
113d48a657bSFilipe David Borba Manana; file containing a list of peer trusted certificates (PEM format)
114d48a657bSFilipe David Borba Manana; ssl_trusted_certificates_file = /etc/ssl/certs/ca-certificates.crt
115d48a657bSFilipe David Borba Manana; maximum peer certificate depth (must be set even if certificate validation is off)
116d48a657bSFilipe David Borba Mananassl_certificate_max_depth = 3
117578c5595SFilipe David Manana
118578c5595SFilipe David Manana[compaction_daemon]
119481436c2SFilipe David Manana; The delay, in seconds, between each check for which database and view indexes
120481436c2SFilipe David Manana; need to be compacted.
121481436c2SFilipe David Mananacheck_interval = 60
122481436c2SFilipe David Manana; If a database or view index file is smaller then this value (in bytes),
123481436c2SFilipe David Manana; compaction will not happen. Very small files always have a very high
124481436c2SFilipe David Manana; fragmentation therefore it's not worth to compact them.
125481436c2SFilipe David Mananamin_file_size = 131072
126481436c2SFilipe David Manana
127481436c2SFilipe David Manana[compactions]
128481436c2SFilipe David Manana; List of compaction rules for the compaction daemon.
1296cb24617SFilipe David Manana; The daemon compacts databases and their respective view groups when all the
130481436c2SFilipe David Manana; condition parameters are satisfied. Configuration can be per database or
131481436c2SFilipe David Manana; global, and it has the following format:
132578c5595SFilipe David Manana;
1336cb24617SFilipe David Manana; database_name = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
1346cb24617SFilipe David Manana; _default = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
135578c5595SFilipe David Manana;
136578c5595SFilipe David Manana; Possible parameters:
137578c5595SFilipe David Manana;
138481436c2SFilipe David Manana; * db_fragmentation - If the ratio (as an integer percentage), of the amount
139481436c2SFilipe David Manana;                      of old data (and its supporting metadata) over the database
140481436c2SFilipe David Manana;                      file size is equal to or greater then this value, this
141481436c2SFilipe David Manana;                      database compaction condition is satisfied.
142481436c2SFilipe David Manana;                      This value is computed as:
143481436c2SFilipe David Manana;
144481436c2SFilipe David Manana;                           (file_size - data_size) / file_size * 100
145481436c2SFilipe David Manana;
146481436c2SFilipe David Manana;                      The data_size and file_size values can be obtained when
147481436c2SFilipe David Manana;                      querying a database's information URI (GET /dbname/).
148481436c2SFilipe David Manana;
149481436c2SFilipe David Manana; * view_fragmentation - If the ratio (as an integer percentage), of the amount
150481436c2SFilipe David Manana;                        of old data (and its supporting metadata) over the view
151481436c2SFilipe David Manana;                        index (view group) file size is equal to or greater then
152481436c2SFilipe David Manana;                        this value, then this view index compaction condition is
153481436c2SFilipe David Manana;                        satisfied. This value is computed as:
154481436c2SFilipe David Manana;
155481436c2SFilipe David Manana;                            (file_size - data_size) / file_size * 100
156481436c2SFilipe David Manana;
157481436c2SFilipe David Manana;                        The data_size and file_size values can be obtained when
158481436c2SFilipe David Manana;                        querying a view group's information URI
159481436c2SFilipe David Manana;                        (GET /dbname/_design/groupname/_info).
160481436c2SFilipe David Manana;
1616cb24617SFilipe David Manana; * from _and_ to - The period for which a database (and its view groups) compaction
1626cb24617SFilipe David Manana;                   is allowed. The value for these parameters must obey the format:
163481436c2SFilipe David Manana;
1646cb24617SFilipe David Manana;                   HH:MM - HH:MM  (HH in [0..23], MM in [0..59])
165481436c2SFilipe David Manana;
166481436c2SFilipe David Manana; * strict_window - If a compaction is still running after the end of the allowed
1676cb24617SFilipe David Manana;                   period, it will be canceled if this parameter is set to 'true'.
1686cb24617SFilipe David Manana;                   It defaults to 'false' and it's meaningful only if the *period*
169481436c2SFilipe David Manana;                   parameter is also specified.
170481436c2SFilipe David Manana;
1716cb24617SFilipe David Manana; * parallel_view_compaction - If set to 'true', the database and its views are
172481436c2SFilipe David Manana;                              compacted in parallel. This is only useful on
173481436c2SFilipe David Manana;                              certain setups, like for example when the database
174481436c2SFilipe David Manana;                              and view index directories point to different
1756cb24617SFilipe David Manana;                              disks. It defaults to 'false'.
176481436c2SFilipe David Manana;
177481436c2SFilipe David Manana; Before a compaction is triggered, an estimation of how much free disk space is
178481436c2SFilipe David Manana; needed is computed. This estimation corresponds to 2 times the data size of
179481436c2SFilipe David Manana; the database or view index. When there's not enough free disk space to compact
180481436c2SFilipe David Manana; a particular database or view index, a warning message is logged.
1814ffa9b07SFilipe David Manana;
182578c5595SFilipe David Manana; Examples:
183578c5595SFilipe David Manana;
1846cb24617SFilipe David Manana; 1) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}]
185481436c2SFilipe David Manana;    The `foo` database is compacted if its fragmentation is 70% or more.
186481436c2SFilipe David Manana;    Any view index of this database is compacted only if its fragmentation
187481436c2SFilipe David Manana;    is 60% or more.
188578c5595SFilipe David Manana;
1896cb24617SFilipe David Manana; 2) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}]
190481436c2SFilipe David Manana;    Similar to the preceding example but a compaction (database or view index)
191481436c2SFilipe David Manana;    is only triggered if the current time is between midnight and 4 AM.
192578c5595SFilipe David Manana;
1936cb24617SFilipe David Manana; 3) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}]
194481436c2SFilipe David Manana;    Similar to the preceding example - a compaction (database or view index)
195481436c2SFilipe David Manana;    is only triggered if the current time is between midnight and 4 AM. If at
196481436c2SFilipe David Manana;    4 AM the database or one of its views is still compacting, the compaction
197481436c2SFilipe David Manana;    process will be canceled.
198578c5595SFilipe David Manana;
1996cb24617SFilipe David Manana; 4) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}, {parallel_view_compaction, true}]
2006cb24617SFilipe David Manana;    Similar to the preceding example, but a database and its views can be
2016cb24617SFilipe David Manana;    compacted in parallel.
2026cb24617SFilipe David Manana;
2036cb24617SFilipe David Manana;_default = [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}]
206270cea9aSfarshid;name = Couchbase Single Server
207270cea9aSfarshid;version = 2.0.0
208270cea9aSfarshid;url = http://www.couchbase.com/
209578c5595SFilipe David Manana
210fe9cb2feSFilipe David Borba Manana[mapreduce]
211fe9cb2feSFilipe David Borba Manana; Maximum duration, in milliseconds, for the execution time of all the map/reduce
212fe9cb2feSFilipe David Borba Manana; functions in a design document against a single document (map function) or against
213fe9cb2feSFilipe David Borba Manana; a list of map values/reductions (reduce/rereduce function).
214fe9cb2feSFilipe David Borba Mananafunction_timeout = 10000
2155297f10dSFilipe David Borba Manana; The maximum byte size allowed to be emitted for a single document. This is the
2165297f10dSFilipe David Borba Manana; sum of the sizes of all emitted keys and values. A maximum of 0 means no limit.
2175297f10dSFilipe David Borba Mananamax_kv_size_per_doc = 1048576
21849e10b8bSharsha; Do not pull document when document fields are not used in any of
21949e10b8bSharsha; map functions defined in a given design document
22049e10b8bSharsha; This is to optimize view indexing time.
22149e10b8bSharshaoptimize_doc_loading = true
222fe9cb2feSFilipe David Borba Manana
223aa8af247SFilipe David Borba Manana[set_views]
224aa8af247SFilipe David Borba Mananaddoc_cache_size = 1048576
22577e563f6SFilipe David Borba Mananabtree_kv_node_threshold = 7168
226e64bba5bSFilipe David Borba Mananabtree_kp_node_threshold = 6144
227e64bba5bSFilipe David Borba Manana; For incremental updates (value in bytes).
228e64bba5bSFilipe David Borba Mananaindexer_max_insert_batch_size = 1048576
22984711665SFilipe David Borba Manana; Maximum size (in bytes) of documents sent to the JavaScript engine.
23084711665SFilipe David Borba Manana; A value of 0 means no limit, any document is passed to the engine.
2316460cc0aSharshaindexer_max_doc_size = 20971520
2323615009fSFilipe David Borba Manana; Sleep period for updates to wait when compactor is in retry phase.
2333615009fSFilipe David Borba Manana; Value is in milliseconds.
2341e205d5aSSarath Lakshmanthrottle_period = 0
235a84ccbb7SVolker Mische
236a84ccbb7SVolker Mische[spatial_views]
237a84ccbb7SVolker Mischevtree_kv_node_threshold = 2000
238a84ccbb7SVolker Mischevtree_kp_node_threshold = 2000
239a84ccbb7SVolker Mischevtree_min_fill_rate = 0.4
240239b2861SVolker Mische
241861be4f8SNimish Gupta[dcp]
24233844fffSVolker Mischeport = 11209
243239b2861SVolker Mischeconnection_timeout = 5000
244dddb3490SNimish Guptaflow_control_buffer_size = 20971520