Configuration options

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.

Raven/MemoryCacheLimitCheckInterval
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/MaxSecondsForTaskToWaitForDatabaseToLoad
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

Raven/MinThreadPoolWorkerThreads
Indicates minimum worker threads amount value for the .net thread pool. Might be usefull when one wants to help the system to deal with violent bursts of work.
Default: ThreadPool current value
Minimum: 2

Raven/MinThreadPoolCompletionThreads
Indicates minimum completion threads amount value for the .net thread pool. Might be usefull when one wants to help the system to deal with violent bursts of work.
Default: ThreadPool current valueMinimum: 2

Index settings

Raven/IndexStoragePath
The path for the indexes on disk. Useful if you want to store the indexes on another HDD for performance reasons.Default: ~/Data/Indexes

Raven/MaxIndexWritesBeforeRecreate
The number of writes before index writer will be recreated (to save memory). Default: 256 * 1024

Raven/MaxNumberOfParallelIndexTasks
The number of 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

Raven/MaxNumberOfItemsToIndexInSingleBatch
The max number of items that will be indexed in a single batch. Larger batch size result in faster indexing, but higher memory usage. Default: 128 * 1024 for 64-bit and 16 * 1024 for 32-bitMinimum: 128

Raven/MaxNumberOfItemsToReduceInSingleBatch
The max number of items that will be indexed in a single batch. Larger batch size result in faster indexing, but higher memory usage. Default: 1/2 * Raven/MaxNumberOfItemsToIndexInSingleBatchMinimum: 128

Raven/MaxNumberOfItemsToPreFetchForIndexing
The max number of items that will be prefetched for indexing. Larger batch size result in faster indexing, but higher memory usage. Default: 128 * 1024 for 64-bit and 16 * 1024 for 32-bitMinimum: 128

Raven/InitialNumberOfItemsToIndexInSingleBatch
The number of items that will be indexed in a single batch. Larger batch size result in faster indexing, but higher memory usage. Default: 512 for 64-bit and 256 for 32-bit

Raven/AvailableMemoryForRaisingIndexBatchSizeLimit
The minimum amount of memory available for us to double the size of InitialNumberOfItemsToIndexInSingleBatch if we need to. Default: 50% of total system memoryMinimum: 768

Raven/ResetIndexOnUncleanShutdown
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

Raven/MaxIndexingRunLatency
What is the suggested max latency for a single indexing run that allows the database to increase the indexing batch size. Default: 5 minutes

Raven/TimeToWaitBeforeRunningIdleIndexes
Time that server is waiting before running idle indices. Default: 10 minutes

Raven/TimeToWaitBeforeMarkingAutoIndexAsIdle
Time that server will wait before marking auto index as idle. Default: 1 hour

Raven/TimeToWaitBeforeRunningAbandonedIndexes
Time that server will wait before running abandoned indices. Default: 3 hours

Raven/TimeToWaitBeforeMarkingIdleIndexAsAbandoned
Time that server will wait before marking idle indices as abandoned. Default: 72 hours

Raven/TaskScheduler
The TaskScheduler type to use for executing indexing.

Raven/NewIndexInMemoryMaxMB
The max size in MB 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

Raven/SkipCreatingStudioIndexes
Control whatever 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

Raven/CompiledIndexCacheDirectory
Path to a directory used by index compilator. Default: ~\Raven\CompiledIndexCache

Raven/NumberOfItemsToExecuteReduceInSingleStep
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

Raven/MaxIndexCommitPointStoreTimeInterval
Maximum time interval for storing commit points for map indexes when new items were added. The commit points are used to restore index if unclean shutdown was detected. Default: 5 minutes

Raven/MinIndexingTimeIntervalToStoreCommitPoint
Minimum interval between between successive indexing that will allow to store a commit point. Default: 1 minute

Raven/DisableInMemoryIndexing
Prevent all new created indexes from being kept in memory. In order to set this option per index you need to specify it in its IdexDefinition. Default: false

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

Data settings:

Raven/RunInMemory
Whatever the database should run purely in memory. When running in memory, nothing is written to disk and if the server is restarted all data will be lost. This is mostly useful for testing. Default: false

Raven/DataDir
The path for the database directory. Can use ~\ as the root, in which case the path will start from the server base directory.Default: ~\Data

Raven/TransactionMode
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

Http settings

Raven/HostName
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

Raven/Port
The port to use when creating the http listener.
Allowed: 1 - 65,536 or * (find first available port from 8080 and upward) Default: 8080

Raven/VirtualDirectory
The virtual directory for the RavenDB server.Default: /

Raven/MaxConcurrentRequestsForDatabaseDuringLoad
Maximum number of allowed request to databases that are being loaded before warning messages will be returned.
Default: 10

Misc settings

Raven/License
The full license string for RavenDB. If Raven/License is specified, it overrides the Raven/LicensePath configuration.

Raven/LicensePath
The path to the license file for RavenDB. Default: ~\license.xml

Raven/ServerName
Name of the server that will show up on /admin/stats endpoint.

Raven/ClusterName
Name of the cluster that will show up on /admin/stats endpoint.

Bundles

Raven/ActiveBundles
Semicolon separated list of bundles names, such as: 'Replication;Versioning'. If the value is not specified, none of the bundles are installed. Default: none

Raven/BundlesSearchPattern
Allow to limit the loaded plugins by specifying a search pattern, such as Raven.*.dll. Multiple values can be specified, separated by a semicolon (;).

Raven/PluginsDirectory
The location of the plugins directory for this database. Default: ~\Plugins

Studio

Raven/WebDir
The location of the web directory for known files that makes up the RavenDB internal website. Default: ~/Raven/WebUI

Raven/RedirectStudioUrl
The url to redirect the user to when then try to access the local studio.

Esent settings

Raven/Esent/CacheSizeMax
The size in MB of the Esent page cache, which is the default storage engine. Default: 256 for 32-bit and 25% of total system memory for 64-bitMinimum: 256 for 32-bit and 1024 for 64-bit

Raven/Esent/MaxVerPages
The maximum size of version store (in memory modified data) available. The value is in megabytes. Default: 512

Raven/Esent/DbExtensionSize
The size that the database file will be enlarged with when the file is full. The value is in megabytes. Lower values will result in smaller file size, but slower performance. Default: 8

Raven/Esent/LogFileSize
The size of the database log file. The value is in megabytes. Default: 64

Raven/Esent/LogBuffers
The size of the in memory buffer for transaction log. Default: 16

Raven/Esent/MaxCursors
The maximum number of cursors allowed concurrently.Default: 2048

Raven/Esent/LogsPath
The path for the esent logs. Useful if you want to store the indexes on another HDD for performance reasons. Default: ~/Data/Logs

Raven/Esent/CircularLog
Whatever circular logs will be used, defaults to true. If you want to use incremental backups, you need to turn this off, but logs will only be truncated on backup.Default: true

Tenants

Raven/Tenants/MaxIdleTimeForTenantDatabase
The time in seconds to allow a tenant database to be idle. Value is in seconds. Default: 900

Raven/Tenants/FrequencyToCheckForIdleDatabases
The time in seconds to check for an idle tenant database. Value is in seconds. Default: 60

Quotas

Raven/Quotas/Size/HardLimitInKB
The hard limit after which we refuse any additional writes. Default: none

Raven/Quotas/Size/SoftMarginInKB
The soft limit before which we will warn about the quota. Default: 1024

Raven/Quotas/Documents/HardLimit
The hard limit after which we refuse any additional documents. Default: Int64.MaxValue

Raven/Quotas/Documents/SoftLimit
The soft limit before which we will warn about the document limit quota. Default: Int64.MaxValue

JavaScript parser

Raven/MaxStepsForScript
Maximum number of steps that javascripts functions can have (used for scripted patching). Default: 10000

Raven/AdditionalStepsForScriptBasedOnDocumentSize
Number that will expand Raven/MaxStepsForScript based on a document size. Formula is as follows: MaxStepsForScript = Raven/MaxStepsForScript + (documentSize * Raven/AdditionalStepsForScriptBasedOnDocumentSize)
Default: 5

Warning

If your database instance does not have a valid license then Admin is the only available option to set. In a commercial system it should not be used. It is only for testing and development purposes, since it grants to ANY user administrative rights.

Raven/AllowLocalAccessWithoutAuthorization
If set local request don't require authentication. Default: Get

Raven/OAuthTokenServer
The url clients should use for authenticating when using OAuth mode.Default: http://RavenDB-Server-Url/OAuth/AccessToken - the internal OAuth server.

Raven/OAuthTokenCertificatePath
The path to the OAuth certificate.Default: none. If no certificate is specified, one will be automatically created.

Raven/OAuthTokenCertificatePassword
The password for the OAuth certificate.Default: none

Raven/Encryption/AlgorithmAssemblyQualifiedName 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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

Raven/Encryption/EncryptIndexes
Boolean value indicating if the indexes should be encrypted.Default: True

Availability of configuration options

Many of the configuration options described in 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.

Configuration option

Database

Global

Raven/MaxPageSize

Raven/MemoryCacheExpiration

Raven/MemoryCacheLimitMegabytes

Raven/MemoryCacheLimitPercentage

Raven/MemoryCacheLimitCheckInterval

Raven/MaxSecondsForTaskToWaitForDatabaseToLoad

Raven/IndexStoragePath

Raven/MaxIndexWritesBeforeRecreate

Raven/MaxNumberOfParallelIndexTasks

Raven/MaxNumberOfItemsToIndexInSingleBatch

Raven/MaxNumberOfItemsToReduceInSingleBatch

Raven/MaxNumberOfItemsToPreFetchForIndexing

Raven/InitialNumberOfItemsToIndexInSingleBatch

Raven/AvailableMemoryForRaisingIndexBatchSizeLimit

Raven/ResetIndexOnUncleanShutdown

Raven/MaxIndexingRunLatency

Raven/TimeToWaitBeforeRunningIdleIndexes

Raven/TimeToWaitBeforeMarkingAutoIndexAsIdle

Raven/TimeToWaitBeforeRunningAbandonedIndexes

Raven/TimeToWaitBeforeMarkingIdleIndexAsAbandoned

Raven/TaskScheduler

Raven/NewIndexInMemoryMaxMB

Raven/CreateAutoIndexesForAdHocQueriesIfNeeded

Raven/SkipCreatingStudioIndexes

Raven/LimitIndexesCapabilities

Raven/CompiledIndexCacheDirectory

Raven/NumberOfItemsToExecuteReduceInSingleStep

Raven/DisableDocumentPreFetchingForIndexing

Raven/MaxIndexCommitPointStoreTimeInterval

Raven/MaxNumberOfStoredCommitPoints

Raven/MinIndexingTimeIntervalToStoreCommitPoint

Raven/DisableInMemoryIndexing

Raven/MemoryLimitForIndexing

Raven/RunInMemory

Raven/DataDir

Raven/StorageTypeName

Raven/TransactionMode

Raven/HostName

Raven/Port

Raven/UseSSL

Raven/VirtualDirectory

Raven/HttpCompression

Raven/AccessControlAllowOrigin

Raven/AccessControlMaxAge

Raven/AccessControlAllowMethods

Raven/AccessControlRequestHeaders

Raven/MaxConcurrentRequestsForDatabaseDuringLoad

Raven/License

Raven/LicensePath

Raven/ServerName

Raven/ClusterName

Raven/ActiveBundles

*

Raven/BundlesSearchPattern

Raven/PluginsDirectory

Raven/Esent/CacheSizeMax

Raven/Esent/MaxVerPages

Raven/Esent/DbExtensionSize

Raven/Esent/LogFileSize

Raven/Esent/LogBuffers

Raven/Esent/MaxCursors

Raven/Esent/LogsPath

Raven/Esent/CircularLog

Raven/Tenants/MaxIdleTimeForTenantDatabase

Raven/Tenants/FrequencyToCheckForIdleDatabases

Raven/Quotas/Size/HardLimitInKB

Raven/Quotas/Size/SoftMarginInKB

Raven/Quotas/Documents/HardLimit

Raven/Quotas/Documents/SoftLimit

Raven/MaxStepsForScript

Raven/AdditionalStepsForScriptBasedOnDocumentSize

Raven/AnonymousAccess

Raven/AllowLocalAccessWithoutAuthorization

Raven/Authorization/Windows/RequiredGroups

Raven/Authorization/Windows/RequiredUsers

Raven/OAuthTokenServer

Raven/OAuthTokenCertificatePath

Raven/OAuthTokenCertificatePassword

Raven/Encryption/Algorithm

**

Raven/Encryption/Key

**

Raven/Encryption/EncryptIndexes

**

Note

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 database.

Note

Raven/Encryption settings can only be provided when database is being created. Changing them later will cause DB malfunction. More about Encryption bundle can be found here.