From 2ef2ffba875afd84ad86f4bfd48ea283fed74b41 Mon Sep 17 00:00:00 2001 From: Guy Korland Date: Sat, 25 Apr 2026 10:22:41 +0300 Subject: [PATCH] docs(config): add missing examples, fix structure and typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add `#### Example` sections to VKEY_MAX_ENTITY_COUNT, CMD_INFO, MAX_INFO_QUERIES, IMPORT_FOLDER, TEMP_FOLDER, JS_HEAP_SIZE, JS_STACK_SIZE (were previously undocumented) - Add `---` horizontal-rule separators after VKEY_MAX_ENTITY_COUNT and CMD_INFO for consistency with the rest of the page - Fix typo: "It's" → "Its" in CMD_INFO description - Fix missing trailing period in MAX_INFO_QUERIES range description - Add Docker volume-mount note to IMPORT_FOLDER explaining that LOAD CSV silently fails without the mount (src: EMSG_FAILED_TO_LOAD_CSV) - Relocate `## Query Configurations` / `### Query Timeout` section to the end of the page so EFFECTS_THRESHOLD, DELTA_MAX_PENDING_CHANGES, IMPORT_FOLDER, TEMP_FOLDER, DELAY_INDEXING, JS_HEAP_SIZE, JS_STACK_SIZE are no longer incorrectly nested under a "Query Configurations" heading - Strip trailing whitespace from JS_HEAP_SIZE and JS_STACK_SIZE sections Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- getting-started/configuration.md | 119 ++++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 27 deletions(-) diff --git a/getting-started/configuration.md b/getting-started/configuration.md index 404e318d..61578984 100644 --- a/getting-started/configuration.md +++ b/getting-started/configuration.md @@ -363,46 +363,52 @@ This configuration can be set when the module loads or at runtime. `VKEY_MAX_ENTITY_COUNT` is 100,000. +#### Example + +```sh +$ redis-server --loadmodule ./falkordb.so VKEY_MAX_ENTITY_COUNT 50000 + +$ redis-cli GRAPH.CONFIG SET VKEY_MAX_ENTITY_COUNT 50000 +``` + +--- + ### CMD_INFO An on/off toggle for the `GRAPH.INFO` command. Disabling this command may increase performance and lower the memory usage and these are the main reasons for it to be disabled. -It's valid values are 'yes' and 'no' (i.e., on and off). +Its valid values are `yes` and `no` (i.e., on and off). #### Default `CMD_INFO` is `yes`. -### MAX_INFO_QUERIES - -A limit for the number of previously executed queries stored in the telemetry stream. - -A number within the range [0, 1000] +#### Example -#### Default +```sh +$ redis-server --loadmodule ./falkordb.so CMD_INFO no -`MAX_INFO_QUERIES` is 1000. +$ redis-cli GRAPH.CONFIG SET CMD_INFO no +``` --- -## Query Configurations - -### Query Timeout +### MAX_INFO_QUERIES -- Before v2.10, or if `TIMEOUT_DEFAULT` and `TIMEOUT_MAX` are not specified: +A limit for the number of previously executed queries stored in the telemetry stream. - `TIMEOUT` allows overriding the `TIMEOUT` configuration parameter for a single read query. Write queries do not timeout. +A number within the range [0, 1000]. -- Since v2.10, if either `TIMEOUT_DEFAULT` or `TIMEOUT_MAX` are specified: +#### Default - `TIMEOUT` allows overriding the `TIMEOUT_DEFAULT` configuration parameter value for a single `GRAPH.QUERY`, `GRAPH.RO_QUERY`, or `GRAPH.PROFILE` command. The `TIMEOUT` value cannot exceed the `TIMEOUT_MAX` value (the command would abort with a `(error) The query TIMEOUT parameter value cannot exceed the TIMEOUT_MAX configuration parameter value` reply). +`MAX_INFO_QUERIES` is 1000. #### Example -Retrieve all paths in a graph with a timeout of 500 milliseconds. - ```sh -GRAPH.QUERY wikipedia "MATCH p=()-[*]->() RETURN p" TIMEOUT 500 +$ redis-server --loadmodule ./falkordb.so MAX_INFO_QUERIES 500 + +$ redis-cli GRAPH.CONFIG SET MAX_INFO_QUERIES 500 ``` --- @@ -462,6 +468,21 @@ FalkorDB is allowed to load CSV files. `IMPORT_FOLDER` defaults to `/var/lib/FalkorDB/import/` +> **Docker note:** When running FalkorDB in Docker, you must mount a host directory into the container at this path for `LOAD CSV` to access your CSV files. For example: +> ```sh +> docker run -p 6379:6379 -it \ +> -v /host/path/to/csvs:/var/lib/FalkorDB/import \ +> -e FALKORDB_ARGS="IMPORT_FOLDER /var/lib/FalkorDB/import" \ +> --rm falkordb/falkordb:latest +> ``` +> Without this volume mount, `LOAD CSV` will fail silently or return a "failed to open CSV file" error. + +#### Example + +```sh +$ redis-server --loadmodule ./falkordb.so IMPORT_FOLDER /data/csv +``` + --- ### TEMP_FOLDER @@ -470,8 +491,14 @@ Path to the directory FalkorDB uses for temporary files (currently used by opera It must be an existing, writable directory. #### Default - -`TEMP_FOLDER` defaults to `/tmp` + +`TEMP_FOLDER` defaults to `/tmp` + +#### Example + +```sh +$ redis-server --loadmodule ./falkordb.so TEMP_FOLDER /var/lib/falkordb/tmp +``` --- @@ -502,25 +529,63 @@ Helps prevent unbounded JS memory growth. #### Default -`JS_HEAP_SIZE` defaults to 268435456 (256 MB) +`JS_HEAP_SIZE` defaults to 268435456 (256 MB) #### Minimum -1048576 (1 MB) +1048576 (1 MB) + +#### Example + +```sh +$ redis-server --loadmodule ./falkordb.so JS_HEAP_SIZE 134217728 # 128 MB + +$ redis-cli GRAPH.CONFIG SET JS_HEAP_SIZE 134217728 +``` --- -### JS_STACK_SIZE +### JS_STACK_SIZE -Maximum QuickJS stack size (in bytes) for JavaScript UDF runtime (affects recursion/call depth limits). -Helps prevent excessive JS stack usage. +Maximum QuickJS stack size (in bytes) for JavaScript UDF runtime (affects recursion/call depth limits). +Helps prevent excessive JS stack usage. #### Default -`JS_STACK_SIZE` defaults to 1048576 (1 MB) +`JS_STACK_SIZE` defaults to 1048576 (1 MB) #### Minimum -1048576 (1 MB) +1048576 (1 MB) + +#### Example + +```sh +$ redis-server --loadmodule ./falkordb.so JS_STACK_SIZE 2097152 # 2 MB + +$ redis-cli GRAPH.CONFIG SET JS_STACK_SIZE 2097152 +``` + +--- + +## Query Configurations + +### Query Timeout + +- Before v2.10, or if `TIMEOUT_DEFAULT` and `TIMEOUT_MAX` are not specified: + + `TIMEOUT` allows overriding the `TIMEOUT` configuration parameter for a single read query. Write queries do not timeout. + +- Since v2.10, if either `TIMEOUT_DEFAULT` or `TIMEOUT_MAX` are specified: + + `TIMEOUT` allows overriding the `TIMEOUT_DEFAULT` configuration parameter value for a single `GRAPH.QUERY`, `GRAPH.RO_QUERY`, or `GRAPH.PROFILE` command. The `TIMEOUT` value cannot exceed the `TIMEOUT_MAX` value (the command would abort with a `(error) The query TIMEOUT parameter value cannot exceed the TIMEOUT_MAX configuration parameter value` reply). + +#### Example + +Retrieve all paths in a graph with a timeout of 500 milliseconds. + +```sh +GRAPH.QUERY wikipedia "MATCH p=()-[*]->() RETURN p" TIMEOUT 500 +``` ---