Dynamic settings
Introduction
Neo4j Enterprise Edition supports changing some configuration settings at runtime, without restarting the service.
Changes to the configuration at runtime are not persisted. To avoid losing changes when restarting Neo4j, make sure you update neo4j.conf as well. In a clustered environment, |
Discover dynamic settings
Use the procedure dbms.listConfig()
to discover which configuration values can be dynamically updated, or consult Dynamic settings reference.
CALL dbms.listConfig()
YIELD name, dynamic
WHERE dynamic
RETURN name
ORDER BY name
LIMIT 4;
+----------------------------------------------+ | name | +----------------------------------------------+ | "dbms.checkpoint.iops.limit" | | "dbms.logs.query.allocation_logging_enabled" | | "dbms.logs.query.enabled" | | "dbms.logs.query.page_logging_enabled" | +----------------------------------------------+ 4 rows
Update dynamic settings
An administrator is able to change some configuration settings at runtime, without restarting the service.
Syntax:
CALL dbms.setConfigValue(setting, value)
Returns:
Nothing on success.
Exceptions:
Unknown or invalid setting name. |
The setting is not dynamic and can not be changed at runtime. |
Invalid setting value. |
The following example shows how to dynamically enable query logging.
CALL dbms.setConfigValue('dbms.logs.query.enabled', 'info')
If an invalid value is passed, the procedure will show a message to that effect.
CALL dbms.setConfigValue('dbms.logs.query.enabled', 'yes')
Failed to invoke procedure `dbms.setConfigValue`: Caused by: org.neo4j.graphdb.config.InvalidSettingException: Bad value 'yes' for setting 'dbms.logs.query.enabled': 'yes' not one of [OFF, INFO, VERBOSE]
To reset a config value to its default, pass an empty string as the value argument.
CALL dbms.setConfigValue('dbms.logs.query.enabled', '')
Dynamic settings reference
- dbms.allow_single_automatic_upgrade
-
Whether to allow a system graph upgrade to happen automatically in single instance mode (dbms.mode=SINGLE).
- dbms.allow_upgrade
-
Whether to allow a store upgrade in case the current version of the database starts against an older version of the store.
- dbms.checkpoint.iops.limit
-
Limit the number of IOs the background checkpoint process will consume per second.
- dbms.logs.debug.level
-
Debug log level threshold.
- dbms.logs.query.allocation_logging_enabled
-
Log allocated bytes for the executed queries being logged.
- dbms.logs.query.early_raw_logging_enabled
-
Log query text and parameters without obfuscating passwords.
- dbms.logs.query.enabled
-
Log executed queries.
- dbms.logs.query.page_logging_enabled
-
Log page hits and page faults for the executed queries being logged.
- dbms.logs.query.parameter_full_entities
-
Log complete parameter entities including id, labels or relationship type, and properties.
- dbms.logs.query.parameter_logging_enabled
-
Log parameters for the executed queries being logged.
- dbms.logs.query.rotation.keep_number
-
Maximum number of history files for the query log.
- dbms.logs.query.rotation.size
-
The file size in bytes at which the query log will auto-rotate.
- dbms.logs.query.runtime_logging_enabled
-
Logs which runtime that was used to run the query.
- dbms.logs.query.threshold
-
If the execution of query takes more time than this threshold, the query is logged once completed - provided query logging is set to INFO.
- dbms.logs.query.time_logging_enabled
-
Log detailed time information for the executed queries being logged.
- dbms.memory.transaction.datababase_max_size
-
Limit the amount of memory that all transaction in one database can consume, in bytes (or kilobytes with the 'k' suffix, megabytes with 'm' and gigabytes with 'g').
- dbms.memory.transaction.global_max_size
-
Limit the amount of memory that all of the running transactions can consume, in bytes (or kilobytes with the 'k' suffix, megabytes with 'm' and gigabytes with 'g').
- dbms.memory.transaction.max_size
-
Limit the amount of memory that a single transaction can consume, in bytes (or kilobytes with the 'k' suffix, megabytes with 'm' and gigabytes with 'g').
- dbms.track_query_allocation
-
Enables or disables tracking of how many bytes are allocated by the execution of a query.
- dbms.track_query_cpu_time
-
Enables or disables tracking of how much time a query spends actively executing on the CPU.
- dbms.transaction.concurrent.maximum
-
The maximum number of concurrently running transactions.
- dbms.transaction.sampling.percentage
-
Transaction sampling percentage.
- dbms.transaction.timeout
-
The maximum time interval of a transaction within which it should be completed.
- dbms.transaction.tracing.level
-
Transaction creation tracing level.
- dbms.tx_log.preallocate
-
Specify if Neo4j should try to preallocate logical log file in advance.
- dbms.tx_log.rotation.retention_policy
-
Make Neo4j keep the logical transaction logs for being able to backup the database.
- dbms.tx_log.rotation.size
-
Specifies at which file size the logical log will auto-rotate.
- dbms.upgrade_max_processors
-
Max number of processors used when upgrading the store.
- fabric.routing.servers
-
A comma-separated list of Fabric instances that form a routing group.