From c60fcce141c7fb3437b9f01015e943de49b8fb3b Mon Sep 17 00:00:00 2001 From: Marcus Date: Mon, 24 Oct 2022 11:43:31 +0200 Subject: [PATCH] add env var QUEUE_WORKER_TIMEOUT --- docs/hosting/environment-variables.md | 1 + docs/hosting/scaling/queue-mode.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/hosting/environment-variables.md b/docs/hosting/environment-variables.md index c51d8da9d..1bf7f9fe5 100644 --- a/docs/hosting/environment-variables.md +++ b/docs/hosting/environment-variables.md @@ -176,6 +176,7 @@ Refer to [User management](/hosting/user-management/) for more information on se | `QUEUE_BULL_REDIS_PASSWORD` | String | - | The Redis password. | | `QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD` | Number | `10000` | The Redis timeout threshold (in seconds). | | `QUEUE_RECOVERY_INTERVAL` | Number | `60` | Interval (in seconds) for active polling to the queue to recover from Redis crashes. `0` disables recovery. May increase Redis traffic significantly. | +| `QUEUE_WORKER_TIMEOUT` | Number | `30` | How long should n8n wait (seconds) for running executions before exiting worker process on shutdown. | | `QUEUE_HEALTH_CHECK_ACTIVE` | Boolean | `false` | Whether to enable health checks (true) or disable (false). | | `QUEUE_HEALTH_CHECK_PORT` | Number | - | The port to serve health checks on. | diff --git a/docs/hosting/scaling/queue-mode.md b/docs/hosting/scaling/queue-mode.md index b08cb570a..b75bbe211 100644 --- a/docs/hosting/scaling/queue-mode.md +++ b/docs/hosting/scaling/queue-mode.md @@ -69,6 +69,7 @@ You can also set the following optional configurations: | `queue.bull.redis.db:0` | `QUEUE_BULL_REDIS_DB` | The default value is `0`. If you change this value, update the configuration. | | `queue.bull.redis.timeoutThreshold:10000ms` | `QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD` | Tells n8n how long it should wait if Redis is unavailable before exiting. The default value is `10000ms`. | | `queue.bull.queueRecoveryInterval:60` | `QUEUE_RECOVERY_INTERVAL` | Adds an active watchdog to n8n that checks Redis for finished executions. This is used to recover when n8n's main process loses connection temporarily to Redis and is not notified about finished jobs. The default value is `60` seconds. | +| `queue.bull.gracefulShutdownTimeout:30` | `QUEUE_WORKER_TIMEOUT` | A graceful shutdown timeout for workers to finish executing jobs before terminating the process. The default value is `30` seconds. | Now you can start your n8n instance and it will connect to your Redis instance.