All the configuration options detailed below are defined in the section of your config file as separate values. When running RavenDB as a website (through IIS, or in Embedded mode), the config file is web.config; otherwise it is the Raven.Server.exe.config file.
Changes to the config file or additions / removal from the Plugins directory will not be picked up automatically by the RavenDB service. For your changes to be recognized you will need to restart the service. You can do so calling: Raven.Server.exe /restart.
If you are running in Embedded mode, or RavenDB is running as an IIS application, touching the web.config file will cause IIS to automatically restart RavenDB.
Sample configurations file
This is the standard app.config XML file. The appSettings section is where the global configuration options go, also for web applications which have a web.config file instead.
The maximum page size that can be specified on this server. Default: 1024 Minimum: 10
The expiration value for documents in the internal document cache. Value is in seconds. Default: 60 minutes
The max size (in megabytes) for the internal document cache inside RavenDB server. Default: 50% of the total system memory minus the size of the Esent cache.
The percentage of memory that the internal document cache inside RavenDB server will use. Default: 0 (auto)
The internal for checking that the internal document cache inside RavenDB server will be cleaned. Format: HH:MM:SS Default: depends on system polling interval
Raven/MemoryLimitForProcessing (previously Raven/MemoryLimitForIndexing)
Maximum number of megabytes that can be used by database to control the maximum size of the processing batches. Default: 1024 or 75% percent of available memory. Default: 1024 or 75% percent of available memory if 1GB is not available
If the database is being loaded for the first time, this value indicates how many seconds will task wait for load completion before throwing exception. Default: 5
Boolean value indicating if server should tune up its resource usage based on current CPU usage. Default: true
Enable document caching inside storage. Will increase performance, but more memory will be used. Default: true
The path for the indexes on a disk. Useful if you want to store the indexes on another HDD for performance reasons. Default: ~/Data/Indexes
The number of writes before the index writer will be recreated (to save memory). Default: 256 * 1024
The number of the indexing tasks that can be run in parallel. There is usually one or two indexing tasks for each index. Default: the number of processors in the current machine
The max number of items that will be indexed in a single batch. Larger batch size results in faster indexing, but higher memory usage. Default: 128 * 1024 for 64-bit and 16 * 1024 for 32-bit Minimum: 128
The max number of items that will be indexed in a single batch. Larger batch size results in faster indexing, but higher memory usage. Default: 1/2 * Raven/MaxNumberOfItemsToIndexInSingleBatchMinimum: 128
The max number of items that will be prefetched for indexing. Larger batch size results in faster indexing, but higher memory usage. Default: 128 * 1024 for 64-bit and 16 * 1024 for 32-bit Minimum: 128
The number of items that will be indexed in a single batch. Larger batch size results in faster indexing, but higher memory usage. Default: 512 for 64-bit and 256 for 32-bit
The minimum amount of memory available for us to double the size of InitialNumberOfItemsToIndexInSingleBatch if we need to. Default: 50% of total system memory Maximum: 768
When the database is shut down rudely, determine whatever to reset the index or to check it. Note that checking the index may take some time on large databases. Default: false
What is the suggested max latency for a single indexing run that allows the database to increase the indexing batch size. Default: 5 minutes
The time for which the server is waiting before running idle indexes. Default: 10 minutes
The time for which the server is waiting before marking auto index as idle. Default: 1 hour
The time for which the server is waiting before running abandoned indexes. Default: 3 hours
The time for which the server is waiting before marking idle indexes as abandoned. Default: 72 hours
The TaskScheduler type to use for executing indexing.
The max size (in megabytes) of a new index held in memory. When the index exceeds that value, it will be using a disk rather than memory for indexing. Default: 64 MB Minimum: 1 MB Maximum: 1024 MB
Whether we allow creation of auto indexes on dynamic queries. Default: true
Control whether the Studio default indexes will be created or not. These default indexes are only used by the UI, and are not required for RavenDB to operate. Default: false
Control whether RavenDB limits what the indexes can do (to avoid potentially destabilizing operations). Default: false
Path to a directory used by index compilator. Default: ~\Raven\CompiledIndexCache
The number that controls if single step reduce optimization is performed. If the count of mapped results is less than this value then the reduce is executed in a single step. Default: 1024
Disables the document prefetcher.
Maximum time interval for storing commit points for map indexes when new items were added. The commit points are used to restore index if the unclean shutdown was detected. Default: 5 minutes
Maximum number of kept commit points to restore map index after unclean shutdown. Default: 5
Minimum interval between successive indexing that will allow storing a commit point. Default: 1 minute
Prevent all newly created indexes from being kept in memory. In order to set this option for an index you need to specify it in its IndexDefinition. Default: false
Number of megabytes after which indexes are flushed to a disk. Default: 5
Limits the number of map outputs that a simple index is allowed to create for a one source document. If a map operation applied to the one document
produces more outputs than this number then an index definition will be considered as a suspicious, the indexing of this document will be skipped and
the appropriate error message will be added to the indexing errors. Default: 15. In order to disable this check set value to -1.
Limits the number of map outputs that a map-reduce index is allowed to create for a one source document. If a map operation applied to the one document
produces more outputs than this number then an index definition will be considered as a suspicious, the indexing of this document will be skipped and
the appropriate error message will be added to the indexing errors. Default: 50. In order to disable this check set value to -1.
Maximum number of items that will be passed to test indexes Default: 512
Indicates how long can we keep the new index in memory before we have to flush it (timespan). Default: 15 minutes
How FieldsToFetch are extracted from the document. Values:
- DoNothing (fields are not fetched from the document)
- Exception (an exception is thrown if we need to fetch fields from the document itself) Default: Enabled
Specifies the maximum number of available boolean clauses in an index query. Default: 1024
Threshold value of available space in megabytes on a disk where indexes are located. If there is less space than specified, it will disable the indexing completely (checks are made every 5 min).
If there is just twice as much free space as specified, then a warning will become visible in the studio.
Default: 2048. Negative value disables protective free space checks.
Specifies the max number of results of Raven/DocumentsByEntityName index to create a precomputed batch used by a newly created index to speed up its calculation. Default: 32768
Disables the recovery mechanism of corrupted indexes on a database startup. Default: false
Base directory for all relative paths (e.g. Raven/DataDir, Raven/AssembliesDirectory, Raven/CompiledIndexCacheDirectory). APPDRIVE value can be used to point automatically to the drive where application lies e.g. APPDRIVE:\Raven\ may point to C:\Raven\ if your application is installed on drive C.
By default, the web.config in distribution package have this value set to APPDRIVE:\Raven\ due to IIS restart issues. Default: ~/ (server's working directory).
Whether the database should run purely in memory. When running in memory, nothing is written on a disk and if the server is restarted, all data will be lost. Useful mostly for testing. Default: false
The path for the database directory. Can use ~\ as the root, in which case the path will start from the server base directory. Default: ~\Databases\System
The path for the legacy database directory (prior 3.0). Can use ~\ as the root, in which case the path will start from the server base directory. Default: null
Raven/StorageEngine or Raven/StorageTypeName
What storage type to use (see: Storage Engines) Allowed values: esent, voron Default: esent
The common setting for both storage engines used to specify the path for Esent logs or Voron journals. Useful if you want to store them on an another drive for performance reasons. Default: null - it means Esent logs will be placed into [database_data_dir]\Logs, while Voron journals will be located under [database_data_dir]
Esent only. What transaction mode to use. Safe transaction mode ensures data consistency, but is slower. Lazy is faster, but may result in a data loss if the server crashes. Allowed values: Lazy, Safe Default: Safe
Disabled the automatic storage schema updates for all resources. Default: false
The hostname to bind the embedded http server to, if we want to bind to a specific hostname, rather than all. Default: none, binds to all host names
The port to use when creating the http listener.
Allowed: 1 - 65,536 or * (find first available port from 8080 and upward) Default: 8080
The virtual directory for the RavenDB server. Default: /
Whatever http compression is enabled. Default: true
Enable/disable SSL. Note: this only applies when RavenDB is run as a windows service. Default: false
When set to All, RavenDB will ignore all SSL certificate validation errors. More here. Default: None
Configures the server to send Access-Control-Allow-Origin header with the specified value. If this value isn't specified, all the access control settings are ignored. Allowed values: null (don't send the header), *, http://example.org, Default: none (if this value isn't specified, all the access control settings are ignored)
Configures the server to send Access-Control-Max-Age header with the specified value. Default: 1728000 (20 days)
Configures the server to send Access-Control-Allow-Methods header with the specified value. Default: PUT, PATCH, GET, DELETE, POST.
Configures the server to send Access-Control-Request-Headers header with the specified value. Default: none
Semicolon separated list of the headers that server should ignore. e.g. Header-To-Ignore-1;Header-To-Ignore-2
Maximum number of allowed request to databases that are being loaded before warning messages will be returned.
If set, changes the ServicePointManager.MaxServicePointIdleTime to given value. Default:null
The full license string for RavenDB. If Raven/License is specified, it overrides the Raven/LicensePath configuration.
The path to the license file for RavenDB. Default: ~\license.xml
Indicates if Raven/AnonymousAccess can be set to Admin when commercial license is registered. Default: false
Name of the server that will show up on /admin/stats endpoint.
Name of the cluster that will show up on /admin/stats endpoint.
Path to directory where server will keep extracted assemblies. Default: ~\Assemblies
Semicolon separated list of the bundles' names, such as: 'Replication;Versioning'. If the value is not specified, none of the bundles are installed. Default: none
Allows limiting the loaded plugins by specifying a search pattern, such as Raven.*.dll. Multiple values can be specified, separated by a semicolon (;).
The location of the plugins directory for this database. Default: ~\Plugins
The location of the web directory for the known files that make up the RavenDB internal website. Default: ~/Raven/WebUI
The url to redirect users to when they try to access the local Studio.
The size (in megabytes) of the Esent page cache, which is the default storage engine. Default: 256 for 32-bit and 25% of total system memory for 64-bit Minimum: 256 for 32-bit and 1024 for 64-bit
The maximum size (in megabytes) of a version store (in memory modified data) available. Default: 512
The preferred size (in megabytes) of version store (in memory modified data) available. If the value exceed that level, optional background tasks data are removed from the version store. Default: 472
The size (in megabytes) that the database file will be enlarged to when the file is full. Lower values will result in smaller file size, but slower performance. Default: 8
The size (in megabytes) of the database log file. Default: 64
The size of the in memory buffer for transaction log. Default: 8192
The maximum number of the concurrently allowed cursors. Default: 2048
The path for the esent logs. Useful if you want to store the logs on an another drive for performance reasons. Default: [database_data_dir]/Logs
Whatever circular logs will be used, it is true by default. If you want to use incremental backups, you need to turn this off, but logs will only be truncated on backup. Default: true
If you want to use incremental backups, you need to turn this to true, but then journal files will not be deleted after applying them to the data file. They will be deleted only after a successful backup. Default: false. Default: false
You can use this setting to specify different paths to temporary files. By default it is empty, which means that temporary files will be created at the same location as data file. Default:null
You can use this setting to specify the maximum buffer pool size that can be used for transactional storage (in gigabytes). By default it is 4. Minimum value is 2. Default: 4
You can use this setting to specify an initial file size for data file (in bytes).
The maximum scratch buffer (modified data by active transactions) size that can be used by Voron (in megabytes).
Allows to use Voron storage on servers running in 32-bit mode. Default: false
The minimum number of megabytes after which each scratch buffer size increase will create a notification. Used for indexing batch size tuning. Default:
1024 when MaxScratchBufferSize > 1024
512 when MaxScratchBufferSize > 512
-1 otherwise (disabled)
Prevents from performing data consistency when retrieving documents from the storage. Default: false
Number of hours after which incremental backup alert will be issued.
Number of days after which incremental backup alert will be shown again.
The time (in seconds) for which a tenant database is allowed to be idle. Default: 900
The time (in seconds) after which a check for an idle tenant database should be run. Default: 60
The maximum number of resources (databases, file systems) to be loaded simultaneously.
The max time before a server will timeout if it doesn't get a free slot to load a resource (database or file systems) concurrently with other loading requests.
The hard limit after which we refuse any additional writes. Default: none
The soft limit before which we will warn about the quota. Default: 1024
The hard limit after which we refuse any additional documents. Default: Int64.MaxValue
The soft limit before which we will warn about the document's limit quota. Default: Int64.MaxValue
Number that will expand Raven/MaxStepsForScript, based on a document size. Formula is as follows: MaxStepsForScript = Raven/MaxStepsForScript + (documentSize * Raven/AdditionalStepsForScriptBasedOnDocumentSize)
Value indicating if scripts can use IncreaseNumberOfAllowedStepsBy function in scripts (more about it here) to increase the maximum allowed number of steps in script. Default: false
Determines what actions an anonymous user can perform. Get - read only, All - read & write, None - allows access only to authenticated users, Admin - all (including administrative actions). Default: Get
If your database instance does not have a valid license, then the Admin is the only available option to set. In a commercial system it should not be used. It is used only for testing and development purposes, since it grants administrative rights to ANY user.
If set local request don't require authentication. Default: Get
The url clients should use for authenticating when using OAuth mode. Default: http://RavenDB-Server-Url/OAuth/AccessToken - the internal OAuth server.
The base 64 to the OAuth key use to communicate with the server. Default:null (if no key is specified, one will be automatically created).
The path to the OAuth certificate. Default: none. If no certificate is specified, one will be automatically created.
The password for the OAuth certificate. Default: none
Allows to access /debug/config, /debug/request-tracing or /debug/info-package endpoints. Valid values are Open or AdminOnly. Default: Open
Raven/Encryption/Algorithm AssemblyQualifiedName value. Additionaly provided type must be a subclass of SymmetricAlgorithm from System.Security.Cryptography namespace and must not be an abstract class. Default: "System.Security.Cryptography.AesManaged, System.Core, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Key used for encryption purposes, with minimum length of 8 characters, base64 encoded.
Boolean value indicating if the indexes should be encrypted. Default: True
Use FIPS compliant encryption algorithms. Read more here.
Number of seconds after which replication will stop reading documents/attachments from disk.
Number of milliseconds before replication requests will timeout.
Default: 60 * 1000
Amount of seconds between each indexes and transformer definition replication attempt (if such replication is allowed). Default: 600 seconds
Maximum amount of items that can be send in replication batch to THIS database. Default: 600 seconds
Force buffering in replication requests (useful if using windows auth under certain scenarios). Default: false
Number of seconds after which prefetcher will stop reading documents from disk.
Maximum number of megabytes after which prefetcher will stop reading documents from disk.
Determines how long replication and periodic backup tombstones will be kept by a database. After the specified time they will be automatically purged on next database startup. Default: 14 days
Availability of configuration options
Many of the configuration options described in the section above can be used both in global and per database context. If you want to set configuration per database, please refer to this page.
Raven/ActiveBundles can be changed after database has been created, but any changes may cause unexpected stability issues and are HIGHLY unrecommended. Please activate bundles only when creating new databases.
Raven/Encryption settings can only be provided when a database is being created. Changing them later will cause DB malfunction. More about Encryption bundle can be found here.