The main Memgraph configuration file is available in
/etc/memgraph/memgraph.conf . You can modify that file to suit your specific
needs. Additional configuration can be specified by including another
configuration file, in a file pointed to by the
variable or by passing arguments on the command line.
Each configuration setting is in the form:
|--bolt-address=0.0.0.0||IP address on which the Bolt server should listen.|
|--bolt-cert-file=||Certificate file which should be used for the Bolt server.|
|--bolt-key-file=||Key file which should be used for the Bolt server.|
|--bolt-num-workers=||Number of workers used by the Bolt server. |
By default, this will be the number of processing units available on the machine.
|--bolt-port=7687||Port on which the Bolt server should listen.|
|--bolt-server-name-for-init=||Server name which the database should send to the client in the Bolt INIT message.|
|--bolt-session-inactivity-timeout=1800||Time in seconds after which inactive Bolt sessions will be closed.|
|--query-cost-planner=true||Use the cost-estimating query planner.|
|--query-execution-timeout-sec=180||Maximum allowed query execution time. |
Queries exceeding this limit will be aborted. Value of 0 means no limit.
|--query-max-plans=1000||Maximum number of generated plans for a query.|
|--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.|
|--query-plan-cache-ttl=60||Time to live for cached query plans, in seconds.|
|--query-vertex-count-to-expand-existing=10||Maximum count of indexed vertices which provoke indexed lookup and then expand to existing, |
instead of a regular expand. Default is 10, to turn off use -1.
|--storage-gc-cycle-sec=30||Storage garbage collector interval (in seconds).|
|--storage-properties-on-edges=true||Controls whether edges have properties.|
|--storage-recover-on-startup=true||Controls whether the storage recovers persisted data on startup.|
|--storage-snapshot-interval-sec=300||Storage snapshot creation interval (in seconds). Set to 0 to disable periodic snapshot creation.|
|--storage-snapshot-on-exit=true||Controls whether the storage creates another snapshot on exit.|
|--storage-snapshot-retention-count=3||The number of snapshots that should always be kept.|
|--storage-wal-enabled=true||Controls whether the storage uses write-ahead-logging. To enable WAL periodic snapshots must be enabled.|
|--storage-wal-file-flush-every-n-tx=100000||Issue a 'fsync' call after this amount of transactions are written to the WAL file. Set to 1 for fully synchronous operation.|
|--storage-wal-file-size-kib=20480||Minimum file size of each WAL file.|
|--kafka-bootstrap-servers=||List of Kafka brokers as a comma separated list of broker |
|--stream-transaction-conflict-retries=30||Number of times to retry a conflicting transaction of a stream|
|--stream-transaction-retry-interval=500||The interval to wait (measured in milliseconds) before retrying to execute again a conflicting transaction|
|--allow-load-csv=true||Controls whether LOAD CSV clause is allowed in queries|
|--also-log-to-stderr=false||log messages go to stderr in addition to logfiles|
|--data-directory=/var/lib/memgraph||Path to directory in which to save all permanent data.|
|--isolation-level=SNAPSHOT_ISOLATION||Isolation level used for the transactions. Allowed values: SNAPSHOT_ISOLATION, READ_COMMITTED, READ_UNCOMMITTED|
|--log-file=/var/log/memgraph/memgraph.log||Path to where the log should be stored.|
|--log-level=WARNING||Minimum log level. Allowed values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL|
|--memory-limit=0||Total memory limit in MiB. Set to 0 to use the default values which are 100% of the physical memory if the swap is enabled and 90% of the physical memory otherwise.|
|--memory-warning-threshold=1024||Memory warning threshold, in MB. If Memgraph detects there is less available RAM it will log a warning. |
Set to 0 to disable.
|--telemetry-enabled=true||Set to true to enable telemetry. We collect information about the running system (CPU and memory information), information about the database runtime (vertex and edge counts and resource usage), and aggregated statistics about some features of the database (e.g. how many times a feature is used) to allow for an easier improvement of the product.|
Additional configuration inclusion
You can define additional configuration files in the main configuration file or
within a Docker command in the terminal. Additional files are processed after
the main configuration file and they override the main configuration file.
Additional configuration files are specified with the