Advertisement
klimeryk

default.ini

Jan 23rd, 2014
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
INI file 13.37 KB | None | 0 0
  1. ; etc/couchdb/default.ini.tpl.  Generated from default.ini.tpl.in by configure.
  2.  
  3. ; Upgrading CouchDB will overwrite this file.
  4.  
  5. [couchdb]
  6. database_dir = ../var/lib/couchdb
  7. view_index_dir = ../var/lib/couchdb
  8. util_driver_dir = ../lib/couch-1.2.0/priv/lib
  9. max_document_size = 4294967296 ; 4 GB
  10. os_process_timeout = 5000 ; 5 seconds. for view and external servers.
  11. max_dbs_open = 100
  12. delayed_commits = true ; set this to false to ensure an fsync before 201 Created is returned
  13. uri_file = ../var/run/couchdb/couch.uri
  14. ; Method used to compress everything that is appended to database and view index files, except
  15. ; for attachments (see the attachments section). Available methods are:
  16. ;
  17. ; none         - no compression
  18. ; snappy       - use google snappy, a very fast compressor/decompressor
  19. ; deflate_[N]  - use zlib's deflate, N is the compression level which ranges from 1 (fastest,
  20. ;                lowest compression ratio) to 9 (slowest, highest compression ratio)
  21. file_compression = snappy
  22.  
  23. [database_compaction]
  24. ; larger buffer sizes can originate smaller files
  25. doc_buffer_size = 524288 ; value in bytes
  26. checkpoint_after = 5242880 ; checkpoint after every N bytes were written
  27.  
  28. [view_compaction]
  29. ; larger buffer sizes can originate smaller files
  30. keyvalue_buffer_size = 2097152 ; value in bytes
  31.  
  32. [httpd]
  33. port = 5984
  34. bind_address = 127.0.0.1
  35. authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
  36. default_handler = {couch_httpd_db, handle_request}
  37. secure_rewrites = true
  38. vhost_global_handlers = _utils, _uuids, _session, _oauth, _users
  39. allow_jsonp = false
  40. ; Options for the MochiWeb HTTP server.
  41. ;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
  42. ; For more socket options, consult Erlang's module 'inet' man page.
  43. ;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
  44. log_max_chunk_size = 1000000
  45.  
  46. [ssl]
  47. port = 6984
  48.  
  49. [log]
  50. file = ../var/log/couchdb/couch.log
  51. level = info
  52. include_sasl = true
  53.  
  54. [couch_httpd_auth]
  55. authentication_db = _users
  56. authentication_redirect = /_utils/session.html
  57. require_valid_user = false
  58. timeout = 600 ; number of seconds before automatic logout
  59. auth_cache_size = 50 ; size is number of cache entries
  60. allow_persistent_cookies = false ; set to true to allow persistent cookies
  61.  
  62. [couch_httpd_oauth]
  63. ; If set to 'true', oauth token and consumer secrets will be looked up
  64. ; in the authentication database (_users). These secrets are stored in
  65. ; a top level property named "oauth" in user documents. Example:
  66. ;     {
  67. ;         "_id": "org.couchdb.user:joe",
  68. ;         "type": "user",
  69. ;         "name": "joe",
  70. ;         "password_sha": "fe95df1ca59a9b567bdca5cbaf8412abd6e06121",
  71. ;         "salt": "4e170ffeb6f34daecfd814dfb4001a73"
  72. ;         "roles": ["foo", "bar"],
  73. ;         "oauth": {
  74. ;             "consumer_keys": {
  75. ;                 "consumerKey1": "key1Secret",
  76. ;                 "consumerKey2": "key2Secret"
  77. ;             },
  78. ;             "tokens": {
  79. ;                 "token1": "token1Secret",
  80. ;                 "token2": "token2Secret"
  81. ;             }
  82. ;         }
  83. ;     }
  84. use_users_db = false
  85.  
  86. [query_servers]
  87. javascript = ./couchjs.exe ../share/couchdb/server/main.js
  88. coffeescript = ./couchjs.exe ../share/couchdb/server/main-coffee.js
  89.  
  90.  
  91. ; Changing reduce_limit to false will disable reduce_limit.
  92. ; If you think you're hitting reduce_limit with a "good" reduce function,
  93. ; please let us know on the mailing list so we can fine tune the heuristic.
  94. [query_server_config]
  95. reduce_limit = true
  96. os_process_limit = 25
  97.  
  98. [daemons]
  99. view_manager={couch_view, start_link, []}
  100. external_manager={couch_external_manager, start_link, []}
  101. query_servers={couch_query_servers, start_link, []}
  102. vhosts={couch_httpd_vhost, start_link, []}
  103. httpd={couch_httpd, start_link, []}
  104. stats_aggregator={couch_stats_aggregator, start, []}
  105. stats_collector={couch_stats_collector, start, []}
  106. uuids={couch_uuids, start, []}
  107. auth_cache={couch_auth_cache, start_link, []}
  108. replication_manager={couch_replication_manager, start_link, []}
  109. os_daemons={couch_os_daemons, start_link, []}
  110. compaction_daemon={couch_compaction_daemon, start_link, []}
  111.  
  112. [httpd_global_handlers]
  113. / = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
  114. favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "../share/couchdb/www"}
  115.  
  116. _utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "../share/couchdb/www"}
  117. _all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req}
  118. _active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}
  119. _config = {couch_httpd_misc_handlers, handle_config_req}
  120. _replicate = {couch_httpd_replicator, handle_req}
  121. _uuids = {couch_httpd_misc_handlers, handle_uuids_req}
  122. _restart = {couch_httpd_misc_handlers, handle_restart_req}
  123. _stats = {couch_httpd_stats_handlers, handle_stats_req}
  124. _log = {couch_httpd_misc_handlers, handle_log_req}
  125. _session = {couch_httpd_auth, handle_session_req}
  126. _oauth = {couch_httpd_oauth, handle_oauth_req}
  127.  
  128. [httpd_db_handlers]
  129. _view_cleanup = {couch_httpd_db, handle_view_cleanup_req}
  130. _compact = {couch_httpd_db, handle_compact_req}
  131. _design = {couch_httpd_db, handle_design_req}
  132. _temp_view = {couch_httpd_view, handle_temp_view_req}
  133. _changes = {couch_httpd_db, handle_changes_req}
  134.  
  135. ; The external module takes an optional argument allowing you to narrow it to a
  136. ; single script. Otherwise the script name is inferred from the first path section
  137. ; after _external's own path.
  138. ; _mypath = {couch_httpd_external, handle_external_req, <<"mykey">>}
  139. ; _external = {couch_httpd_external, handle_external_req}
  140.  
  141. [httpd_design_handlers]
  142. _view = {couch_httpd_view, handle_view_req}
  143. _show = {couch_httpd_show, handle_doc_show_req}
  144. _list = {couch_httpd_show, handle_view_list_req}
  145. _info = {couch_httpd_db,   handle_design_info_req}
  146. _rewrite = {couch_httpd_rewrite, handle_rewrite_req}
  147. _update = {couch_httpd_show, handle_doc_update_req}
  148.  
  149. ; enable external as an httpd handler, then link it with commands here.
  150. ; note, this api is still under consideration.
  151. ; [external]
  152. ; mykey = /path/to/mycommand
  153.  
  154. ; Here you can setup commands for CouchDB to manage
  155. ; while it is alive. It will attempt to keep each command
  156. ; alive if it exits.
  157. ; [os_daemons]
  158. ; some_daemon_name = /path/to/script -with args
  159.  
  160.  
  161. [uuids]
  162. ; Known algorithms:
  163. ;   random - 128 bits of random awesome
  164. ;     All awesome, all the time.
  165. ;   sequential - monotonically increasing ids with random increments
  166. ;     First 26 hex characters are random. Last 6 increment in
  167. ;     random amounts until an overflow occurs. On overflow, the
  168. ;     random prefix is regenerated and the process starts over.
  169. ;   utc_random - Time since Jan 1, 1970 UTC with microseconds
  170. ;     First 14 characters are the time in hex. Last 18 are random.
  171. algorithm = sequential
  172.  
  173. [stats]
  174. ; rate is in milliseconds
  175. rate = 1000
  176. ; sample intervals are in seconds
  177. samples = [0, 60, 300, 900]
  178.  
  179. [attachments]
  180. compression_level = 8 ; from 1 (lowest, fastest) to 9 (highest, slowest), 0 to disable compression
  181. compressible_types = text/*, application/javascript, application/json, application/xml
  182.  
  183. [replicator]
  184. db = _replicator
  185. ; Maximum replicaton retry count can be a non-negative integer or "infinity".
  186. max_replication_retry_count = 10
  187. ; More worker processes can give higher network throughput but can also
  188. ; imply more disk and network IO.
  189. worker_processes = 4
  190. ; With lower batch sizes checkpoints are done more frequently. Lower batch sizes
  191. ; also reduce the total amount of used RAM memory.
  192. worker_batch_size = 500
  193. ; Maximum number of HTTP connections per replication.
  194. http_connections = 20
  195. ; HTTP connection timeout per replication.
  196. ; Even for very fast/reliable networks it might need to be increased if a remote
  197. ; database is too busy.
  198. connection_timeout = 30000
  199. ; If a request fails, the replicator will retry it up to N times.
  200. retries_per_request = 10
  201. ; Some socket options that might boost performance in some scenarios:
  202. ;       {nodelay, boolean()}
  203. ;       {sndbuf, integer()}
  204. ;       {recbuf, integer()}
  205. ;       {priority, integer()}
  206. ; See the `inet` Erlang module's man page for the full list of options.
  207. socket_options = [{keepalive, true}, {nodelay, false}]
  208. ; Path to a file containing the user's certificate.
  209. ;cert_file = /full/path/to/server_cert.pem
  210. ; Path to file containing user's private PEM encoded key.
  211. ;key_file = /full/path/to/server_key.pem
  212. ; String containing the user's password. Only used if the private keyfile is password protected.
  213. ;password = somepassword
  214. ; Set to true to validate peer certificates.
  215. verify_ssl_certificates = false
  216. ; File containing a list of peer trusted certificates (in the PEM format).
  217. ;ssl_trusted_certificates_file = /etc/ssl/certs/ca-certificates.crt
  218. ; Maximum peer certificate depth (must be set even if certificate validation is off).
  219. ssl_certificate_max_depth = 3
  220.  
  221. [compaction_daemon]
  222. ; The delay, in seconds, between each check for which database and view indexes
  223. ; need to be compacted.
  224. check_interval = 300
  225. ; If a database or view index file is smaller then this value (in bytes),
  226. ; compaction will not happen. Very small files always have a very high
  227. ; fragmentation therefore it's not worth to compact them.
  228. min_file_size = 131072
  229.  
  230. [compactions]
  231. ; List of compaction rules for the compaction daemon.
  232. ; The daemon compacts databases and their respective view groups when all the
  233. ; condition parameters are satisfied. Configuration can be per database or
  234. ; global, and it has the following format:
  235. ;
  236. ; database_name = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
  237. ; _default = [ {ParamName, ParamValue}, {ParamName, ParamValue}, ... ]
  238. ;
  239. ; Possible parameters:
  240. ;
  241. ; * db_fragmentation - If the ratio (as an integer percentage), of the amount
  242. ;                      of old data (and its supporting metadata) over the database
  243. ;                      file size is equal to or greater then this value, this
  244. ;                      database compaction condition is satisfied.
  245. ;                      This value is computed as:
  246. ;
  247. ;                           (file_size - data_size) / file_size * 100
  248. ;
  249. ;                      The data_size and file_size values can be obtained when
  250. ;                      querying a database's information URI (GET /dbname/).
  251. ;
  252. ; * view_fragmentation - If the ratio (as an integer percentage), of the amount
  253. ;                        of old data (and its supporting metadata) over the view
  254. ;                        index (view group) file size is equal to or greater then
  255. ;                        this value, then this view index compaction condition is
  256. ;                        satisfied. This value is computed as:
  257. ;
  258. ;                            (file_size - data_size) / file_size * 100
  259. ;
  260. ;                        The data_size and file_size values can be obtained when
  261. ;                        querying a view group's information URI
  262. ;                        (GET /dbname/_design/groupname/_info).
  263. ;
  264. ; * from _and_ to - The period for which a database (and its view groups) compaction
  265. ;                   is allowed. The value for these parameters must obey the format:
  266. ;
  267. ;                   HH:MM - HH:MM  (HH in [0..23], MM in [0..59])
  268. ;
  269. ; * strict_window - If a compaction is still running after the end of the allowed
  270. ;                   period, it will be canceled if this parameter is set to 'true'.
  271. ;                   It defaults to 'false' and it's meaningful only if the *period*
  272. ;                   parameter is also specified.
  273. ;
  274. ; * parallel_view_compaction - If set to 'true', the database and its views are
  275. ;                              compacted in parallel. This is only useful on
  276. ;                              certain setups, like for example when the database
  277. ;                              and view index directories point to different
  278. ;                              disks. It defaults to 'false'.
  279. ;
  280. ; Before a compaction is triggered, an estimation of how much free disk space is
  281. ; needed is computed. This estimation corresponds to 2 times the data size of
  282. ; the database or view index. When there's not enough free disk space to compact
  283. ; a particular database or view index, a warning message is logged.
  284. ;
  285. ; Examples:
  286. ;
  287. ; 1) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}]
  288. ;    The `foo` database is compacted if its fragmentation is 70% or more.
  289. ;    Any view index of this database is compacted only if its fragmentation
  290. ;    is 60% or more.
  291. ;
  292. ; 2) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}]
  293. ;    Similar to the preceding example but a compaction (database or view index)
  294. ;    is only triggered if the current time is between midnight and 4 AM.
  295. ;
  296. ; 3) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}]
  297. ;    Similar to the preceding example - a compaction (database or view index)
  298. ;    is only triggered if the current time is between midnight and 4 AM. If at
  299. ;    4 AM the database or one of its views is still compacting, the compaction
  300. ;    process will be canceled.
  301. ;
  302. ; 4) [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "00:00"}, {to, "04:00"}, {strict_window, true}, {parallel_view_compaction, true}]
  303. ;    Similar to the preceding example, but a database and its views can be
  304. ;    compacted in parallel.
  305. ;
  306. ;_default = [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement