From d13c1317eeb8aa18273999c3e33774c7bd8bd7a2 Mon Sep 17 00:00:00 2001 From: katarinasupe Date: Mon, 9 Nov 2026 14:52:06 +0100 Subject: [PATCH 1/3] Stop persisting run-time settings except the license and AWS settings --- pages/database-management/configuration.mdx | 52 ++++++++++++++++----- pages/database-management/logs.mdx | 4 +- pages/deployment/best-practices.mdx | 2 +- pages/fundamentals/data-types.mdx | 3 +- pages/querying/vector-search.mdx | 3 +- 5 files changed, 48 insertions(+), 16 deletions(-) diff --git a/pages/database-management/configuration.mdx b/pages/database-management/configuration.mdx index 066f03a86..0b323d342 100644 --- a/pages/database-management/configuration.mdx +++ b/pages/database-management/configuration.mdx @@ -312,32 +312,60 @@ systemctl status memgraph ### Change configuration during runtime Memgraph contains settings that can be modified during runtime using a Cypher query. -Some runtime settings are persisted between multiple runs, while others will -fallback to the value of the command-line argument. +A value set at runtime lasts until Memgraph restarts. On restart, each setting +takes the value of its flag, or the flag's default if the flag isn't set. To +keep a value, set the flag in your configuration. + +The exceptions are the license settings (`organization.name`, +`enterprise.license`) and the AWS settings (`aws.region`, `aws.access_key`, +`aws.secret_key`, `aws.endpoint_url`), which are stored in the data directory +and survive a restart. For the AWS settings, a flag set at startup replaces the +stored value. For the license, see [License sources and +selection](/database-management/enabling-memgraph-enterprise#license-sources-and-selection). + + +**Breaking change in Memgraph 3.15**: runtime settings no longer survive a +restart, except the license and AWS settings. To keep a value you set with `SET +DATABASE SETTING`, add the matching flag to your configuration. + + +Before Memgraph 3.15, `server.name`, `timezone`, `hops_limit_partial_results`, +`storage-gc-aggressive`, `storage.omit_vector_index_properties_on_return`, +`file.download_conn_timeout_sec`, `log.min_duration_ms`, `log.failed_queries` +and `log.query_plan` kept their runtime value when their flag wasn't set. On the +first start after upgrading, Memgraph applies such a stored value one last time, +unless the matching flag is set, and then deletes it. From the second start on, +only the flag applies, for example `--timezone=Europe/Zagreb` or +`--bolt-server-name-for-init="My Server"`. | Setting name | Description | Persistent between runs | |----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| | organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | yes | | enterprise.license | License key for Memgraph Enterprise. | yes | -| server.name | Bolt server name. | yes | -| query.timeout | Maximum allowed query execution time. Value of 0 means no limit. | yes | +| server.name | Bolt server name. | no | +| query.timeout | Maximum allowed query execution time in seconds. Allowed values: 0 to 1000000000; 0 means no limit. Corresponds to `--query-execution-timeout-sec`. | no | | log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | no | | log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | no | -| log.min_duration_ms | Log successful queries whose `parse + plan + execute` time (ms) reaches this threshold with a `[slow-query]` tag. `-1` disables; `0` logs every successful query. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | yes | -| log.failed_queries | Log each failed query with a `[failed-query]` tag. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | yes | -| log.query_plan | Append the query's EXPLAIN plan to its `[slow-query]` log line. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | yes | +| log.min_duration_ms | Log successful queries whose `parse + plan + execute` time (ms) reaches this threshold with a `[slow-query]` tag. `-1` disables; `0` logs every successful query. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | +| log.failed_queries | Log each failed query with a `[failed-query]` tag. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | +| log.query_plan | Append the query's EXPLAIN plan to its `[slow-query]` log line. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | | cartesian-product-enabled | Enforces cartesian product operator during query matching. | no | -| hops_limit_partial_results | If set to `true`, partial results are returned when the hops limit is reached. If set to `false`, an exception is thrown when the hops limit is reached. The default value is `true`. | yes | -| timezone | IANA timezone identifier string setting the instance's timezone. | yes | +| hops_limit_partial_results | If set to `true`, partial results are returned when the hops limit is reached. If set to `false`, an exception is thrown when the hops limit is reached. The default value is `true`. | no | +| timezone | IANA timezone identifier string setting the instance's timezone. | no | | storage.snapshot.interval | Define periodic snapshot schedule via 6-field cron expression (seconds, minute, hour, day of month, month, day of week—an [Enterprise feature](/database-management/enabling-memgraph-enterprise)) or as a period in seconds. Set to empty string to disable. | no | -| storage-gc-aggressive | Enables aggressive garbage collection, which performs full cleanup on GC call where deltas, vertices, edges or indices and constraints skip lists are being cleaned up. This setting requires taking a unique lock that will temporarily block the system during garbage collection. | yes | +| storage-gc-aggressive | Enables aggressive garbage collection, which performs full cleanup on GC call where deltas, vertices, edges or indices and constraints skip lists are being cleaned up. This setting requires taking a unique lock that will temporarily block the system during garbage collection. | no | | storage.access_timeout_sec | Storage access timeout in seconds. Guards against queries waiting indefinitely for storage access. Valid range: [1, 1000000]. Corresponds to `--storage-access-timeout-sec`. | no | -| storage.omit_vector_index_properties_on_return | When `true`, properties backed by a vector index (for example embeddings) are omitted when a whole node or relationship is returned; they remain accessible via explicit property access (`n.embedding`, `properties(n)`). Corresponds to `--storage-omit-vector-index-properties-on-return`. | yes | +| debug-query-plans | Log potential query plans at `DEBUG` level. Corresponds to `--debug-query-plans`. | no | +| file.download_conn_timeout_sec| Timeout in seconds for establishing a connection to the remote server when downloading a file. Corresponds to `--file-download-conn-timeout-sec`. | no | +| storage.omit_vector_index_properties_on_return | When `true`, properties backed by a vector index (for example embeddings) are omitted when a whole node or relationship is returned; they remain accessible via explicit property access (`n.embedding`, `properties(n)`). Corresponds to `--storage-omit-vector-index-properties-on-return`. | no | | aws.region | AWS region in which your S3 service is located. | yes | | aws.access_key | Access key used to READ the file from S3. | yes | | aws.secret_key | Secret key used to READ the file from S3. | yes | | aws.endpoint_url | URL on which S3 can be accessed (if using some other S3-compatible storage). | yes | +Setting `query.timeout` to a value outside its allowed range fails with +`Cannot update setting 'query.timeout': Value must be a number in range [0, 1000000000].` + All settings can be fetched by calling the following query: ```opencypher @@ -450,7 +478,7 @@ execution in Memgraph. | `--query-ast-cache-max-size=1000` | Maximum number of parsed query abstract syntax trees to cache.
Value of 0 disables the cache. | `[int32]` | | `--query-callable-mappings-path=/etc/memgraph/apoc_compatibility_mappings.json` | Path to the JSON file that contains possible alias mappings for query procedures in the form of key-value pairs. | `[string]` | | `--query-cost-planner=true` | Use the cost-estimating query planner. When enabled (`true`), Memgraph generates multiple query plans, selecting the one with the lowest cost. If disabled (`false`), it creates a single plan that is executed. | `[bool]` | -| `--query-execution-timeout-sec=600` | Maximum allowed query execution time.
Queries exceeding this limit will be aborted. Value of 0 means no limit. | `[uint64]` | +| `--query-execution-timeout-sec=600` | Maximum allowed query execution time in seconds.
Queries exceeding this limit will be aborted. Value of 0 means no limit. Allowed values: 0 to 1000000000; Memgraph doesn't start with a value outside this range. | `[double]` | | `--query-max-plans=1000` | Maximum number of generated plans for a query. | `[uint64]` | | `--query-modules-directory=/usr/lib/memgraph/query_modules` | Directory where modules with custom query procedures are stored. NOTE: Multiple comma-separated directories can be defined. The flag is ignored on coordinator instances in a [high availability](/database-management/clustering/high-availability) setup. | `[string]` | | `--query-plan-cache-max-size=1000` | Maximum number of query plans to cache. | `[int32]` | diff --git a/pages/database-management/logs.mdx b/pages/database-management/logs.mdx index 07ea428a0..ac61e1b1f 100644 --- a/pages/database-management/logs.mdx +++ b/pages/database-management/logs.mdx @@ -112,7 +112,9 @@ read/write Cypher workload, not schema-maintenance operations. ### Configuring at runtime and per session -The three settings can be changed globally at runtime and persist between runs: +The three settings can be changed globally at runtime. A runtime value lasts +until Memgraph restarts; to keep it, set the matching flag (`--log-min-duration-ms`, +`--log-failed-queries`, `--log-query-plan`): ```cypher SET DATABASE SETTING "log.min_duration_ms" TO "500"; diff --git a/pages/deployment/best-practices.mdx b/pages/deployment/best-practices.mdx index eff4f2e42..d8ac017d8 100644 --- a/pages/deployment/best-practices.mdx +++ b/pages/deployment/best-practices.mdx @@ -250,7 +250,7 @@ flags to consider: SET DATABASE SETTING "query.timeout" TO "0"; ``` - This is particularly useful in environments where you don’t want to restart Memgraph but still need to adjust timeout behavior for specific workloads. + This is particularly useful in environments where you don’t want to restart Memgraph but still need to adjust timeout behavior for specific workloads. The value lasts until Memgraph restarts, after which `--query-execution-timeout-sec` applies again. For more information on how to configure Memgraph, as well as what are all the flags that Memgraph can be configured on, please check out the [configuration documentation page](/database-management/configuration). diff --git a/pages/fundamentals/data-types.mdx b/pages/fundamentals/data-types.mdx index 3d4520caf..88c2cd69d 100644 --- a/pages/fundamentals/data-types.mdx +++ b/pages/fundamentals/data-types.mdx @@ -578,7 +578,8 @@ The timezone can be defined via: 1. `--timezone` command-line argument 1. `SET DATABASE SETTING "timezone" TO "Europe/Rome"` query -Both methods use IANA timezone descriptors to specify the timezone. See [list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). +A timezone set with the query lasts until Memgraph restarts; to keep it, use the +`--timezone` flag. Both methods use IANA timezone descriptors to specify the timezone. See [list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). diff --git a/pages/querying/vector-search.mdx b/pages/querying/vector-search.mdx index cfe87bae3..60d00850a 100644 --- a/pages/querying/vector-search.mdx +++ b/pages/querying/vector-search.mdx @@ -362,7 +362,8 @@ database but out of returned objects, enable `--storage-omit-vector-index-properties-on-return` (setting `storage.omit_vector_index_properties_on_return`, default `false`). It is toggleable at runtime - no restart - and can also be set on startup via the -[flag](/database-management/configuration#storage): +[flag](/database-management/configuration#storage). A value set at runtime lasts +until Memgraph restarts; to keep it, use the flag: ```cypher SET DATABASE SETTING 'storage.omit_vector_index_properties_on_return' TO 'true'; From 372d982ec15689ae4d8b1f750bdab3982f5eb513 Mon Sep 17 00:00:00 2001 From: katarinasupe Date: Mon, 9 Nov 2026 15:40:59 +0100 Subject: [PATCH 2/3] Align the runtime settings table --- pages/database-management/configuration.mdx | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/pages/database-management/configuration.mdx b/pages/database-management/configuration.mdx index 0b323d342..aeb0c8aa2 100644 --- a/pages/database-management/configuration.mdx +++ b/pages/database-management/configuration.mdx @@ -338,30 +338,30 @@ unless the matching flag is set, and then deletes it. From the second start on, only the flag applies, for example `--timezone=Europe/Zagreb` or `--bolt-server-name-for-init="My Server"`. -| Setting name | Description | Persistent between runs | -|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| -| organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | yes | -| enterprise.license | License key for Memgraph Enterprise. | yes | -| server.name | Bolt server name. | no | -| query.timeout | Maximum allowed query execution time in seconds. Allowed values: 0 to 1000000000; 0 means no limit. Corresponds to `--query-execution-timeout-sec`. | no | -| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | no | -| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | no | -| log.min_duration_ms | Log successful queries whose `parse + plan + execute` time (ms) reaches this threshold with a `[slow-query]` tag. `-1` disables; `0` logs every successful query. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | -| log.failed_queries | Log each failed query with a `[failed-query]` tag. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | -| log.query_plan | Append the query's EXPLAIN plan to its `[slow-query]` log line. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | -| cartesian-product-enabled | Enforces cartesian product operator during query matching. | no | -| hops_limit_partial_results | If set to `true`, partial results are returned when the hops limit is reached. If set to `false`, an exception is thrown when the hops limit is reached. The default value is `true`. | no | -| timezone | IANA timezone identifier string setting the instance's timezone. | no | -| storage.snapshot.interval | Define periodic snapshot schedule via 6-field cron expression (seconds, minute, hour, day of month, month, day of week—an [Enterprise feature](/database-management/enabling-memgraph-enterprise)) or as a period in seconds. Set to empty string to disable. | no | -| storage-gc-aggressive | Enables aggressive garbage collection, which performs full cleanup on GC call where deltas, vertices, edges or indices and constraints skip lists are being cleaned up. This setting requires taking a unique lock that will temporarily block the system during garbage collection. | no | -| storage.access_timeout_sec | Storage access timeout in seconds. Guards against queries waiting indefinitely for storage access. Valid range: [1, 1000000]. Corresponds to `--storage-access-timeout-sec`. | no | -| debug-query-plans | Log potential query plans at `DEBUG` level. Corresponds to `--debug-query-plans`. | no | -| file.download_conn_timeout_sec| Timeout in seconds for establishing a connection to the remote server when downloading a file. Corresponds to `--file-download-conn-timeout-sec`. | no | -| storage.omit_vector_index_properties_on_return | When `true`, properties backed by a vector index (for example embeddings) are omitted when a whole node or relationship is returned; they remain accessible via explicit property access (`n.embedding`, `properties(n)`). Corresponds to `--storage-omit-vector-index-properties-on-return`. | no | -| aws.region | AWS region in which your S3 service is located. | yes | -| aws.access_key | Access key used to READ the file from S3. | yes | -| aws.secret_key | Secret key used to READ the file from S3. | yes | -| aws.endpoint_url | URL on which S3 can be accessed (if using some other S3-compatible storage). | yes | +| Setting name | Description | Persistent between runs | +|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| +| organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | yes | +| enterprise.license | License key for Memgraph Enterprise. | yes | +| server.name | Bolt server name. | no | +| query.timeout | Maximum allowed query execution time in seconds. Allowed values: 0 to 1000000000; 0 means no limit. Corresponds to `--query-execution-timeout-sec`. | no | +| log.level | Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL. | no | +| log.to_stderr | Log messages go to `stderr` in addition to `logfiles`. | no | +| log.min_duration_ms | Log successful queries whose `parse + plan + execute` time (ms) reaches this threshold with a `[slow-query]` tag. `-1` disables; `0` logs every successful query. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | +| log.failed_queries | Log each failed query with a `[failed-query]` tag. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | +| log.query_plan | Append the query's EXPLAIN plan to its `[slow-query]` log line. See [Slow and failed query logging](/database-management/logs#slow-and-failed-query-logging). | no | +| cartesian-product-enabled | Enforces cartesian product operator during query matching. | no | +| hops_limit_partial_results | If set to `true`, partial results are returned when the hops limit is reached. If set to `false`, an exception is thrown when the hops limit is reached. The default value is `true`. | no | +| timezone | IANA timezone identifier string setting the instance's timezone. | no | +| storage.snapshot.interval | Define periodic snapshot schedule via 6-field cron expression (seconds, minute, hour, day of month, month, day of week—an [Enterprise feature](/database-management/enabling-memgraph-enterprise)) or as a period in seconds. Set to empty string to disable. | no | +| storage-gc-aggressive | Enables aggressive garbage collection, which performs full cleanup on GC call where deltas, vertices, edges or indices and constraints skip lists are being cleaned up. This setting requires taking a unique lock that will temporarily block the system during garbage collection. | no | +| storage.access_timeout_sec | Storage access timeout in seconds. Guards against queries waiting indefinitely for storage access. Valid range: [1, 1000000]. Corresponds to `--storage-access-timeout-sec`. | no | +| debug-query-plans | Log potential query plans at `DEBUG` level. Corresponds to `--debug-query-plans`. | no | +| file.download_conn_timeout_sec | Timeout in seconds for establishing a connection to the remote server when downloading a file. Corresponds to `--file-download-conn-timeout-sec`. | no | +| storage.omit_vector_index_properties_on_return | When `true`, properties backed by a vector index (for example embeddings) are omitted when a whole node or relationship is returned; they remain accessible via explicit property access (`n.embedding`, `properties(n)`). Corresponds to `--storage-omit-vector-index-properties-on-return`. | no | +| aws.region | AWS region in which your S3 service is located. | yes | +| aws.access_key | Access key used to READ the file from S3. | yes | +| aws.secret_key | Secret key used to READ the file from S3. | yes | +| aws.endpoint_url | URL on which S3 can be accessed (if using some other S3-compatible storage). | yes | Setting `query.timeout` to a value outside its allowed range fails with `Cannot update setting 'query.timeout': Value must be a number in range [0, 1000000000].` From cddd9d474e8872dbdd3482d0fa83a76f713ed2c0 Mon Sep 17 00:00:00 2001 From: katarinasupe Date: Mon, 23 Nov 2026 11:55:38 +0100 Subject: [PATCH 3/3] Say what the runtime settings table lists --- pages/database-management/configuration.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/database-management/configuration.mdx b/pages/database-management/configuration.mdx index 2c8959cc9..79b14484f 100644 --- a/pages/database-management/configuration.mdx +++ b/pages/database-management/configuration.mdx @@ -338,6 +338,8 @@ unless the matching flag is set, and then deletes it. From the second start on, only the flag applies, for example `--timezone=Europe/Zagreb` or `--bolt-server-name-for-init="My Server"`. +You can change the following settings at runtime with `SET DATABASE SETTING`: + | Setting name | Description | Persistent between runs | |------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| | organization.name | Name of the organization using the instance of Memgraph (used for verifying the license key). | yes |