Skip to content

Commit 2bbbc23

Browse files
committed
[FAB-4243] Set CouchDB max_dbs_open config option
CouchDB returns errors to peer if more than N channels (databases) are being accessed concurrently. Current default value for max_dbs_open in default.ini is 500. This corresponds to 500 shards or 62 databases (there are 8 shards per database by default).  For highly concurrent environments with a large number of channels, a better default would be 1000 databases, which corresponds to max_dbs_open of 8000. CouchDB uses LRU cache to manage open databases, and closes databases as needed. Perhaps more important than picking a higher default value, is that the configuration value be exposed in the CouchDB local.ini configuration file, so that consumers are aware of the setting, and can easily adjust if needed. Change-Id: I19f99737939ed27c70955c6d5784232f02ef8b2c Signed-off-by: David Enyeart <[email protected]>
1 parent f20846c commit 2bbbc23

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

images/couchdb/local.ini

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ database_dir = /opt/couchdb/data/
1414
view_index_dir = /opt/couchdb/data/
1515
uri_file = /opt/couchdb/data/couch.uri
1616

17+
; Specify the number of database shards that can be open concurrently.
18+
; CouchDB uses LRU cache to manage open databases, and closes databases
19+
; as needed. Deployments with large numbers of channels and high
20+
; concurrency may need to increase this setting.
21+
max_dbs_open = 8000
22+
1723
; only allow the admin user to connect
1824
; Uncomment the following statement to enable admin user security.
1925
; default_security = admin_only
@@ -50,4 +56,3 @@ iterations = 1000 ; iterations for password hashing
5056

5157
[attachments]
5258
compressible_types = text/*, application/javascript, application/json, application/xml, application/octet-stream
53-

0 commit comments

Comments
 (0)