{
  "schema_version": 2,
  "id": "operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/Configuration",
  "title": "Configuration",
  "url": "https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/configuration/",
  "summary": "Configure the operation parameters",
  "aliases": [
    "/develop/interact/programmability/triggers-and-functions/configuration/"
  ],
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-21T16:36:38+01:00",
  "page_type": "content",
  "content_hash": "c743be81deb5663a61c354db3544f8cf2eef008912452d8ee83d93cb0d119626",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis Stack's triggers and functions feature provides configuration options to control its operation. These options can be set when the module is bootstrapped and, in some cases, at runtime.\n\nThe following sections describe the configuration options and how to set them."
    },
    {
      "id": "bootstrap-configuration",
      "title": "Bootstrap configuration",
      "role": "content",
      "text": "You can set your configuration options when the module is loaded.\nWhen the module is loaded at start time, the module configuration can be defined in the Redis configuration file. When loading the module at runtime the configuration can be given to the [`MODULE LOADEX`](https://redis.io/docs/latest/commands/module-loadex) command. Each configuration must be prefixed with the module name, `redisgears_2.<configuration name>`."
    },
    {
      "id": "runtime-configuration",
      "title": "Runtime configuration",
      "role": "content",
      "text": "You may set certain configuration options at runtime. Setting a configuration at runtime is done using [`CONFIG SET`](https://redis.io/docs/latest/commands/config-set) command. Here each configuration must be prefixed with the module name, `redisgears_2.<configuration name>`.\n\nExample:\n\n[code example]"
    },
    {
      "id": "configurations",
      "title": "Configurations",
      "role": "configuration",
      "text": ""
    },
    {
      "id": "execution-threads",
      "title": "execution-threads",
      "role": "content",
      "text": "The `execution-threads` configuration option controls the number of background threads that run JS code. **Note that libraries are considered single threaded**. This configuration allows Redis to parallelize the invocation of multiple libraries.\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n1\n\n_Minimum Value_\n\n1\n\n_Maximum Value_\n\n32\n\n_Runtime Configurability_\n\nNo"
    },
    {
      "id": "library-fatal-failure-policy",
      "title": "library-fatal-failure-policy",
      "role": "content",
      "text": "The `library-fatal-failure-policy` configuration option controls how to handle a fatal error. A fatal error is consider one of the following:\n\n* Block timeout - The function blocks the Redis processes for too long (configurable using the [lock-redis-timeout](#lock-redis-timeout) configuration value)\n* OOM - The function consumes too much memory (configurable using the [v8-maxmemory](#v8-maxmemory) configuration value).\n\nThis configuration basically allows choosing between two options:\n\n* Do not break atomicity property, even at the cost of killing the Redis processes.\n* Keep my Redis processes alive, even at the cost of losing atomicity.\n\n_Expected Value_\n\n* kill - Save the atomicity property. Risk of killing the Redis processes.\n* abort - Abort the invocation of the function and keep the Redis processes alive. Risk of losing the atomicity property.\n\n_Default_\n\nabort\n\n_Runtime Configurability_\n\nYes"
    },
    {
      "id": "v8-maxmemory",
      "title": "v8-maxmemory",
      "role": "content",
      "text": "The `v8-maxmemory` configuration option controls the maximum amount of memory used by all V8 libraries. Exceeding this limit is considered a fatal error and will be handled base on the [library-fatal-failure-policy](#library-fatal-failure-policy) configuration value.\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n200M\n\n_Minimum Value_\n\n50M\n\n_Maximum Value_\n\n1G\n\n_Runtime Configurability_\n\nNo"
    },
    {
      "id": "v8-library-initial-memory-usage",
      "title": "v8-library-initial-memory-usage",
      "role": "content",
      "text": "The `v8-library-initial-memory-usage` configuration option controls the initial memory given to a single V8 library. This value can not be greater then [`v8-library-initial-memory-limit`](#v8-library-initial-memory-limit) or [v8-maxmemory](#v8-maxmemory).\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n2M\n\n_Minimum Value_\n\n1M\n\n_Maximum Value_\n\n10M\n\n_Runtime Configurability_\n\nNo"
    },
    {
      "id": "v8-library-initial-memory-limit",
      "title": "v8-library-initial-memory-limit",
      "role": "content",
      "text": "The `v8-library-initial-memory-limit` configuration option controls the initial memory limit on a single V8 library. This value can not be greater then [v8-maxmemory](#v8-maxmemory).\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n3M\n\n_Minimum Value_\n\n2M\n\n_Maximum Value_\n\n20M\n\n_Runtime Configurability_\n\nNo"
    },
    {
      "id": "v8-library-memory-usage-delta",
      "title": "v8-library-memory-usage-delta",
      "role": "content",
      "text": "The `v8-library-memory-usage-delta` configuration option controls the delta by which we will increase the V8 library memory limit once the limit reached. This value can not be greater then [v8-maxmemory](#v8-maxmemory).\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n1M\n\n_Minimum Value_\n\n1M\n\n_Maximum Value_\n\n10M\n\n_Runtime Configurability_\n\nNo"
    },
    {
      "id": "lock-redis-timeout",
      "title": "lock-redis-timeout",
      "role": "content",
      "text": "The `lock-redis-timeout` configuration option controls the maximum amount of time (in MS) a library can lock Redis. Exceeding this limit is considered a fatal error and will be handled based on the [library-fatal-failure-policy](#library-fatal-failure-policy) configuration value. This\nconfiguration only affects library loading at runtime with `TFUNCTION LOAD`.\nThe timeout for loading a library from RDB is set separately via\n[db-loading-lock-redis-timeout](#db-loading-lock-redis-timeout).\n\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n500 MS\n\n_Minimum Value_\n\n100 MS\n\n_Maximum Value_\n\nUnlimited\n\n_Runtime Configurability_\n\nYes\n\n#### Side effects\n\nWhen setting `lock-redis-timeout`, if the new value is higher than the\n`db-loading-lock-redis-timeout`, the `db-loading-lock-redis-timeout` is also updated to\nthis value."
    },
    {
      "id": "db-loading-lock-redis-timeout",
      "title": "db-loading-lock-redis-timeout",
      "role": "content",
      "text": "This timeout configuration is used for setting the upper time limit\n(in milliseconds) for the library loading from RDB.\n\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n30000 MS\n\n_Minimum Value_\n\n100 MS\n\n_Maximum Value_\n\nUnlimited\n\n_Runtime Configurability_\n\nYes\n\n#### Notes\n\nThe value cannot be lower than the value of `lock-redis-timeout`."
    },
    {
      "id": "remote-task-default-timeout",
      "title": "remote-task-default-timeout",
      "role": "content",
      "text": "The `remote-task-default-timeout` configuration option controls the timeout when waiting for a remote task to finish. If the timeout is reached an error will result.\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n500 MS\n\n_Minimum Value_\n\n1 MS\n\n_Maximum Value_\n\nUnlimited\n\n_Runtime Configurability_\n\nYes"
    },
    {
      "id": "error-verbosity",
      "title": "error-verbosity",
      "role": "errors",
      "text": "The `error-verbosity` configuration option controls the verbosity of error messages that will be provided by triggers and functions. The higher the value the more verbose the error messages will be (for example, including stack traces and extra information for better analysis and debugging).\n\n_Expected Value_\n\nInteger\n\n_Default_\n\n1\n\n_Minimum Value_\n\n1\n\n_Maximum Value_\n\n2\n\n_Runtime Configurability_\n\nYes"
    }
  ],
  "examples": [
    {
      "id": "runtime-configuration-ex0",
      "language": "bash",
      "code": "> config set redisgears_2.lock-redis-timeout 1000\nOK",
      "section_id": "runtime-configuration"
    }
  ]
}
