---
title: "Configuration: Database"
description: "Set RavenDB database-level configuration options for concurrent operations, document size limits, and database idle timeout behavior."
url: "https://docs.ravendb.net/7.2/server/configuration/database-configuration"
version: "7.2"
---

# Configuration: Database

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Configuration: Database

> **Note**
>
> - The following configuration keys control database behavior.
>
> - In this article:
>   - Server-wide scope:  
>     [Databases.Compression.CompressAllCollectionsDefault](#databasescompressioncompressallcollectionsdefault)  
>     [Databases.Compression.CompressRevisionsDefault](#databasescompressioncompressrevisionsdefault)  
>     [Databases.ConcurrentLoadTimeoutInSec](#databasesconcurrentloadtimeoutinsec)  
>     [Databases.FrequencyToCheckForIdleInSec](#databasesfrequencytocheckforidleinsec)  
>     [Databases.MaxConcurrentLoads](#databasesmaxconcurrentloads)
>
>   - Server-wide, or database scope:  
>     [Databases.CollectionOperationTimeoutInSec](#databasescollectionoperationtimeoutinsec)  
>     [Databases.DeepCleanupThresholdInMin](#databasesdeepcleanupthresholdinmin)  
>     [Databases.MaxIdleTimeInSec](#databasesmaxidletimeinsec)  
>     [Databases.OperationTimeoutInSec](#databasesoperationtimeoutinsec)  
>     [Databases.PulseReadTransactionLimitInMb](#databasespulsereadtransactionlimitinmb)  
>     [Databases.QueryOperationTimeoutInSec](#databasesqueryoperationtimeoutinsec)  
>     [Databases.QueryTimeoutInSec](#databasesquerytimeoutinsec)  
>     [Databases.RegularCleanupThresholdInMin](#databasesregularcleanupthresholdinmin)

## Databases.Compression.CompressAllCollectionsDefault

Set whether [documents compression](https://docs.ravendb.net/7.2/server/storage/documents-compression.md) is enabled by default for ALL COLLECTIONS in newly created databases.  
Setting this to *false* does not prevent you from enabling compression later, after a database is created.

- **Type**: `bool`
- **Default**: `false`
- **Scope**: Server-wide only

## Databases.Compression.CompressRevisionsDefault

Set whether [documents compression](https://docs.ravendb.net/7.2/server/storage/documents-compression.md) is enabled by default for REVISIONS in newly created databases.  
It may be useful to disable this option if the database is expected to run on very low-end hardware.  
Setting this to *false* does not prevent you from enabling compression later, after a database is created.

- **Type**: `bool`
- **Default**: `true`
- **Scope**: Server-wide only

## Databases.ConcurrentLoadTimeoutInSec

The time (in seconds) that a database waits for a free loading slot before the
load attempt times out.

RavenDB limits the number of databases that load at the same time
(set by [Databases.MaxConcurrentLoads](#databasesmaxconcurrentloads)).  
When this limit is reached, each additional database that needs to load waits
for a slot to free up.  
This can happen when a burst of requests accesses many idle databases at once.

If no slot frees up within this period, RavenDB raises a warning notification and retries
the load on the next request that accesses the database.  
The server keeps running, and the database loads on that next request.  
Note that if you see this warning regularly, you can raise this value, raise
`Databases.MaxConcurrentLoads`, or both.

- **Type**: `int`
- **Default**: `60`
- **Scope**: Server-wide only

## Databases.FrequencyToCheckForIdleInSec

The interval (in seconds) at which the system checks for idle databases.

- **Type**: `int`
- **Default**: `60`
- **Scope**: Server-wide only

## Databases.MaxConcurrentLoads

Specifies the maximum number of databases that can be loaded concurrently.  
If more databases need to load at the same time, each database waits for a free slot
for the period set by [Databases.ConcurrentLoadTimeoutInSec](#databasesconcurrentloadtimeoutinsec).

- **Type**: `int`
- **Default**: `8`
- **Scope**: Server-wide only

## Databases.CollectionOperationTimeoutInSec

The time (in seconds) to wait before canceling certain collection operations (e.g., batch delete documents).  
If the operation exceeds the specified duration, an *OperationCanceledException* is thrown.

- **Type**: `int`
- **Default**: `300`
- **Scope**: Server-wide or per database

## Databases.DeepCleanupThresholdInMin

EXPERT ONLY.  
A deep database cleanup will be performed when this number of minutes has passed since the last time work was done on the database.

- **Type**: `int`
- **Default**: `5`
- **Scope**: Server-wide or per database

## Databases.MaxIdleTimeInSec

Sets the maximum idle time (in seconds) for a database.  
After this period, an idle database will be unloaded from memory.  
Consider using a lower value if memory resources are limited.

- **Type**: `int`
- **Default**: `900`
- **Scope**: Server-wide or per database

## Databases.OperationTimeoutInSec

The time (in seconds) to wait before canceling certain operations, such as indexing terms.

- **Type**: `int`
- **Default**: `300`
- **Scope**: Server-wide or per database

## Databases.PulseReadTransactionLimitInMb

The number of megabytes used by encryption buffers (for encrypted databases) or 32-bit mapped buffers (on 32-bit systems),
after which a read transaction is renewed to reduce memory usage during long-running operations such as backups or streaming.

- **Type**: `int`
- **Default**: The default value is determined by the total physical memory (RAM) available on the machine:
  - On 32-bit platforms, or when less than 1 GB of RAM is available: `16 MB`
  - Up to 4 GB RAM: `32 MB`
  - Up to 16 GB RAM: `64 MB`
  - Up to 64 GB RAM: `128 MB`
  - More than 64 GB RAM: `256 MB`
- **Scope**: Server-wide or per database

## Databases.QueryOperationTimeoutInSec

The time (in seconds) to wait before canceling a query-related operation (e.g., patch or delete query).  
The timeout resets with each processed document,  
and will only be exceeded if no document is processed within the specified period.

- **Type**: `int`
- **Default**: `300`
- **Scope**: Server-wide or per database

## Databases.QueryTimeoutInSec

The time (in seconds) to wait before canceling a query.  
Applies to both regular and streamed queries.

If the query exceeds the specified time, an *OperationCanceledException* is thrown.  
For streamed queries, the timeout is reset each time a result is pushed to the stream.  
The timeout will be exceeded only if no result is streamed within the timeout period.

- **Type**: `int`
- **Default**: `300`
- **Scope**: Server-wide or per database

## Databases.RegularCleanupThresholdInMin

EXPERT ONLY.  
A regular database cleanup will be performed when this number of minutes has passed since the database was last idle.

- **Type**: `int`
- **Default**: `10`
- **Scope**: Server-wide or per database
