|
| 1 | +# Configuration: Database |
| 2 | +--- |
| 3 | + |
| 4 | +{NOTE: } |
| 5 | + |
| 6 | +* The following configuration keys control database behavior. |
| 7 | + |
| 8 | +* In this article: |
| 9 | + * Server-wide scope: |
| 10 | + [Databases.Compression.CompressAllCollectionsDefault](../../server/configuration/database-configuration#databases.compression.compressallcollectionsdefault) |
| 11 | + [Databases.Compression.CompressRevisionsDefault](../../server/configuration/database-configuration#databases.compression.compressrevisionsdefault) |
| 12 | + [Databases.ConcurrentLoadTimeoutInSec](../../server/configuration/database-configuration#databases.concurrentloadtimeoutinsec) |
| 13 | + [Databases.FrequencyToCheckForIdleInSec](../../server/configuration/database-configuration#databases.frequencytocheckforidleinsec) |
| 14 | + [Databases.MaxConcurrentLoads](../../server/configuration/database-configuration#databases.maxconcurrentloads) |
| 15 | + |
| 16 | + * Server-wide, or database scope: |
| 17 | + [Databases.CollectionOperationTimeoutInSec](../../server/configuration/database-configuration#databases.collectionoperationtimeoutinsec) |
| 18 | + [Databases.DeepCleanupThresholdInMin](../../server/configuration/database-configuration#databases.deepcleanupthresholdinmin) |
| 19 | + [Databases.MaxIdleTimeInSec](../../server/configuration/database-configuration#databases.maxidletimeinsec) |
| 20 | + [Databases.OperationTimeoutInSec](../../server/configuration/database-configuration#databases.operationtimeoutinsec) |
| 21 | + [Databases.PulseReadTransactionLimitInMb](../../server/configuration/database-configuration#databases.pulsereadtransactionlimitinmb) |
| 22 | + [Databases.QueryOperationTimeoutInSec](../../server/configuration/database-configuration#databases.queryoperationtimeoutinsec) |
| 23 | + [Databases.QueryTimeoutInSec](../../server/configuration/database-configuration#databases.querytimeoutinsec) |
| 24 | + [Databases.RegularCleanupThresholdInMin](../../server/configuration/database-configuration#databases.regularcleanupthresholdinmin) |
| 25 | + |
| 26 | +{NOTE/} |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +{PANEL:Databases.Compression.CompressAllCollectionsDefault} |
| 31 | + |
| 32 | +Set whether [documents compression](../../server/storage/documents-compression) is enabled by default for ALL COLLECTIONS in newly created databases. |
| 33 | +Setting this to _false_ does not prevent you from enabling compression later, after a database is created. |
| 34 | + |
| 35 | +- **Type**: `bool` |
| 36 | +- **Default**: `false` |
| 37 | +- **Scope**: Server-wide only |
| 38 | + |
| 39 | +{PANEL/} |
| 40 | + |
| 41 | +{PANEL:Databases.Compression.CompressRevisionsDefault} |
| 42 | + |
| 43 | +Set whether [documents compression](../../server/storage/documents-compression) is enabled by default for REVISIONS in newly created databases. |
| 44 | +It may be useful to disable this option if the database is expected to run on very low-end hardware. |
| 45 | +Setting this to _false_ does not prevent you from enabling compression later, after a database is created. |
| 46 | + |
| 47 | +- **Type**: `bool` |
| 48 | +- **Default**: `true` |
| 49 | +- **Scope**: Server-wide only |
| 50 | + |
| 51 | +{PANEL/} |
| 52 | + |
| 53 | +{PANEL:Databases.ConcurrentLoadTimeoutInSec} |
| 54 | + |
| 55 | +The time (in seconds) to wait for a database to start loading (and become available) when the system is under load - when many different databases are being loaded concurrently. |
| 56 | + |
| 57 | +- **Type**: `int` |
| 58 | +- **Default**: `60` |
| 59 | +- **Scope**: Server-wide only |
| 60 | + |
| 61 | +{PANEL/} |
| 62 | + |
| 63 | +{PANEL: Databases.FrequencyToCheckForIdleInSec} |
| 64 | + |
| 65 | +The interval (in seconds) at which the system checks for idle databases. |
| 66 | + |
| 67 | +- **Type**: `int` |
| 68 | +- **Default**: `60` |
| 69 | +- **Scope**: Server-wide only |
| 70 | + |
| 71 | +{PANEL/} |
| 72 | + |
| 73 | +{PANEL:Databases.MaxConcurrentLoads} |
| 74 | + |
| 75 | +Specifies the maximum number of databases that can be loaded concurrently. |
| 76 | + |
| 77 | +- **Type**: `int` |
| 78 | +- **Default**: `8` |
| 79 | +- **Scope**: Server-wide only |
| 80 | + |
| 81 | +{PANEL/} |
| 82 | + |
| 83 | +{PANEL:Databases.CollectionOperationTimeoutInSec} |
| 84 | + |
| 85 | +The time (in seconds) to wait before canceling certain collection operations (e.g., batch delete documents). |
| 86 | +If the operation exceeds the specified duration, an *OperationCanceledException* is thrown. |
| 87 | + |
| 88 | +- **Type**: `int` |
| 89 | +- **Default**: `300` |
| 90 | +- **Scope**: Server-wide or per database |
| 91 | + |
| 92 | +{PANEL/} |
| 93 | + |
| 94 | +{PANEL:Databases.DeepCleanupThresholdInMin} |
| 95 | + |
| 96 | +EXPERT ONLY. |
| 97 | +A deep database cleanup will be performed when this number of minutes has passed since the last time work was done on the database. |
| 98 | + |
| 99 | +- **Type**: `int` |
| 100 | +- **Default**: `5` |
| 101 | +- **Scope**: Server-wide or per database |
| 102 | + |
| 103 | +{PANEL/} |
| 104 | + |
| 105 | +{PANEL:Databases.MaxIdleTimeInSec} |
| 106 | + |
| 107 | +Sets the maximum idle time (in seconds) for a database. |
| 108 | +After this period, an idle database will be unloaded from memory. |
| 109 | +Consider using a lower value if memory resources are limited. |
| 110 | + |
| 111 | +- **Type**: `int` |
| 112 | +- **Default**: `900` |
| 113 | +- **Scope**: Server-wide or per database |
| 114 | + |
| 115 | +{PANEL/} |
| 116 | + |
| 117 | +{PANEL:Databases.OperationTimeoutInSec} |
| 118 | + |
| 119 | +The time (in seconds) to wait before canceling certain operations, such as indexing terms. |
| 120 | + |
| 121 | +- **Type**: `int` |
| 122 | +- **Default**: `300` |
| 123 | +- **Scope**: Server-wide or per database |
| 124 | + |
| 125 | +{PANEL/} |
| 126 | + |
| 127 | +{PANEL:Databases.PulseReadTransactionLimitInMb} |
| 128 | + |
| 129 | +The number of megabytes used by encryption buffers (for encrypted databases) or 32-bit mapped buffers (on 32-bit systems), |
| 130 | +after which a read transaction is renewed to reduce memory usage during long-running operations such as backups or streaming. |
| 131 | + |
| 132 | +- **Type**: `int` |
| 133 | +- **Default**: The default value is determined by the total physical memory (RAM) available on the machine: |
| 134 | + * On 32-bit platforms, or when less than 1 GB of RAM is available: `16 MB` |
| 135 | + * Up to 4 GB RAM: `32 MB` |
| 136 | + * Up to 16 GB RAM: `64 MB` |
| 137 | + * Up to 64 GB RAM: `128 MB` |
| 138 | + * More than 64 GB RAM: `256 MB` |
| 139 | +- **Scope**: Server-wide or per database |
| 140 | + |
| 141 | +{PANEL/} |
| 142 | + |
| 143 | +{PANEL:Databases.QueryOperationTimeoutInSec} |
| 144 | + |
| 145 | +The time (in seconds) to wait before canceling a query-related operation (e.g., patch or delete query). |
| 146 | +The timeout resets with each processed document, |
| 147 | +and will only be exceeded if no document is processed within the specified period. |
| 148 | + |
| 149 | +- **Type**: `int` |
| 150 | +- **Default**: `300` |
| 151 | +- **Scope**: Server-wide or per database |
| 152 | + |
| 153 | +{PANEL/} |
| 154 | + |
| 155 | +{PANEL:Databases.QueryTimeoutInSec} |
| 156 | + |
| 157 | +The time (in seconds) to wait before canceling a query. |
| 158 | +Applies to both regular and streamed queries. |
| 159 | + |
| 160 | +If the query exceeds the specified time, an *OperationCanceledException* is thrown. |
| 161 | +For streamed queries, the timeout is reset each time a result is pushed to the stream. |
| 162 | +The timeout will be exceeded only if no result is streamed within the timeout period. |
| 163 | + |
| 164 | +- **Type**: `int` |
| 165 | +- **Default**: `300` |
| 166 | +- **Scope**: Server-wide or per database |
| 167 | + |
| 168 | +{PANEL/} |
| 169 | + |
| 170 | +{PANEL:Databases.RegularCleanupThresholdInMin} |
| 171 | + |
| 172 | +EXPERT ONLY. |
| 173 | +A regular database cleanup will be performed when this number of minutes has passed since the database was last idle. |
| 174 | + |
| 175 | +- **Type**: `int` |
| 176 | +- **Default**: `10` |
| 177 | +- **Scope**: Server-wide or per database |
| 178 | + |
| 179 | +{PANEL/} |
0 commit comments