Task request timed out after 60 second

Hello,

i’m trying to install n8n v2 on ubuntu server
but when i try to execude code node (js and python) i have this error , (other node works) can any one have an idea of the problem?:

Task request timed out after 60 seconds

Your Code node task was not matched to a runner within the timeout period. This indicates that the task runner is currently down, or not ready, or at capacity, so it cannot service your task.

If you are repeatedly executing Code nodes with long-running tasks across your instance, please space them apart to give the runner time to catch up. If this does not describe your use case, please open a GitHub issue or reach out to support.

If needed, you can increase the timeout using the N8N_RUNNERS_TASK_REQUEST_TIMEOUT environment variable.

this is my docker compose file:

services:
  n8n-db:
    image: postgres:16.1
    restart: always
    environment:
      - POSTGRES_DB=n8n
      - POSTGRES_PASSWORD=n8n
      - POSTGRES_USER=n8n
    volumes:
      - postgres-data:/var/lib/postgresql/data

  n8n-redis:
    image: redis:7-alpine
    restart: always
    volumes:
      - redis-data:/data

  n8n-main:
    image: n8nio/n8n
    restart: always
    depends_on:
      - n8n-db
      - n8n-redis
    volumes:
      - n8n-data:/home/node/.n8n
    ports:
      - 5678:5678
    environment:
      - WEBHOOK_URL=https://n8nv2.*****.com
      - N8N_HOST=n8nv2.*****.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - N8N_SECURE_COOKIE=true
      - EXECUTIONS_MODE=queue
      - N8N_TRUST_PROXY=true
      - N8N_PROXY_HOPS=1
      # Task runner configuration for v2 (external mode)
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - N8N_RUNNERS_AUTH_TOKEN=****
      # Security settings
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
      - N8N_BLOCK_ENV_ACCESS_IN_NODE=true
      - N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=false
      # File access restriction
      - N8N_RESTRICT_FILE_ACCESS_TO=/home/node/.n8n-files
      # Binary data configuration (filesystem mode for regular mode)
      - N8N_DEFAULT_BINARY_DATA_MODE=filesystem
      - NODE_FUNCTION_ALLOW_BUILTIN=crypto
      - OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_HOST=n8n-db
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_SCHEMA=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - DB_POSTGRESDB_POOL_SIZE=40
      - DB_POSTGRESDB_CONNECTION_TIMEOUT=30000
      # Queue mode configuration
      - QUEUE_BULL_REDIS_HOST=n8n-redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_DB=0

  n8n-worker:
    image: n8nio/n8n
    restart: always
    command: worker --concurrency=6
    depends_on:
      - n8n-db
      - n8n-redis
      - n8n-worker-task-runner
    volumes:
      - n8n-data:/home/node/.n8n
    environment:
      - EXECUTIONS_MODE=queue
      - WEBHOOK_URL=https://n8nv2.*****.com
      - N8N_HOST=n8nv2.*****.com
      - N8N_SKIP_DB_INIT=true
      # Task runner configuration for v2 (external mode)
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - N8N_RUNNERS_AUTH_TOKEN=****
      - N8N_PROCESS=worker
      # Security settings
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
      - N8N_BLOCK_ENV_ACCESS_IN_NODE=true
      # File access restriction
      - N8N_RESTRICT_FILE_ACCESS_TO=/home/node/.n8n-files
      - NODE_FUNCTION_ALLOW_BUILTIN=crypto
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_HOST=n8n-db
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_SCHEMA=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - DB_POSTGRESDB_POOL_SIZE=40
      - DB_POSTGRESDB_CONNECTION_TIMEOUT=30000
      # Queue mode configuration
      - QUEUE_BULL_REDIS_HOST=n8n-redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_DB=0

  # Task runner for n8n-worker with Python support for v2
  n8n-worker-task-runner:
    image: n8nio/runners
    restart: always
    depends_on:
      - n8n-db
      - n8n-redis
    environment:
      # Task runner configuration
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_TASK_BROKER_URI=http://n8n-worker:5679
      - N8N_RUNNERS_AUTH_TOKEN=*****
      # Enable Python and JavaScript support
      - N8N_RUNNERS_ENABLED_TASK_TYPES=javascript,python
      # Auto shutdown after 15 seconds of inactivity
      - N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15
    volumes:
      # Shared volume for file access if needed
      - n8n-data:/home/node/.n8n

volumes:
  postgres-data:
  redis-data:
  n8n-data:

Thank you

Hi @Nac, welcome!

I have a few notes on the compose you can try:

depends_on:
      - n8n-worker

Give that a try and let me know the result..

2 Likes

Thank you for your reply

after doing the changes the execution still the same error!

Could you please check the logs for the following services:

n8n:
image

n8n worker:

task runner:

These are the logs when everything is working correctly,

so what do you actually see in the logs on your side?

i missed something here:

add n8n-main here:

    depends_on:
      - n8n-main
      - n8n-db
      - n8n-redis

root@root:/home/rootroot/n8n# docker compose logs n8n-main
n8n-main-1 | Last session crashed
n8n-main-1 | Initializing n8n process
n8n-main-1 | Error tracking disabled because this release is older than 6 weeks.
n8n-main-1 | n8n ready on ::, port 5678
n8n-main-1 | n8n Task Broker ready on 0.0.0.0, port 5679
n8n-main-1 | [license SDK] Skipping renewal on init: license cert is not initialized
n8n-main-1 | Database connection timed out
n8n-main-1 | Database connection recovered
n8n-main-1 | Version: 2.1.5
n8n-main-1 | Start Active Workflows:
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | Activated workflow “My workflow 4” (ID: OBe171zlcxYgGxIO)
n8n-main-1 |
n8n-main-1 | Editor is now accessible via:
n8n-main-1 | https://n8nv2.****.com
n8n-main-1 | Enqueued execution 197 (job 194)
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | Enqueued execution 198 (job 195)
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | Execution 198 (job 195) finished
n8n-main-1 | Enqueued execution 199 (job 196)
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | Execution 199 (job 196) finished
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’
n8n-main-1 | Blocked GET /robots.txt for “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36; compatible; OAI-SearchBot/1.3; robots.txt; +https://openai.com/searchbot”
n8n-main-1 | Blocked GET / for “Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)”
n8n-main-1 | There was a problem in ‘Microsoft Outlook Trigger’ node in workflow ‘OBe171zlcxYgGxIO’: ‘undefined’

root@root:/home/rootroot/n8n# docker compose logs n8n-worker
n8n-worker-1 | Error tracking disabled because this release is older than 6 weeks.
n8n-worker-1 | n8n Task Broker ready on 0.0.0.0, port 5679
n8n-worker-1 | [license SDK] Skipping renewal on init: renewOnInit is disabled in config
n8n-worker-1 | [license SDK] Skipping renewal on init: autoRenewEnabled is disabled in config
n8n-worker-1 | [license SDK] Skipping renewal on init: license cert is not initialized
n8n-worker-1 | Database connection timed out
n8n-worker-1 |
n8n-worker-1 | n8n worker is now ready
n8n-worker-1 | * Version: 2.1.5
n8n-worker-1 | * Concurrency: 6
n8n-worker-1 |
n8n-worker-1 | Registered runner “launcher-javascript” (0fb41816afa53a70)
n8n-worker-1 | Registered runner “launcher-python” (134bc572a2ccf9de)
n8n-worker-1 | Database connection recovered
n8n-worker-1 | Worker started execution 197 (job 194)
n8n-worker-1 | Task runner connection attempt failed with status code 403
n8n-worker-1 | Task runner connection attempt failed with status code 403
n8n-worker-1 | Registered runner “launcher-javascript” (87d646507d06ab6b)
n8n-worker-1 | Registered runner “launcher-javascript” (743cbe04ce886efb)
n8n-worker-1 | Worker started execution 198 (job 195)
n8n-worker-1 | Task runner connection attempt failed with status code 403
n8n-worker-1 | Task runner connection attempt failed with status code 403
n8n-worker-1 | Task runner connection attempt failed with status code 403
n8n-worker-1 | Task runner connection attempt failed with status code 403
n8n-worker-1 | Task request timed out
n8n-worker-1 | Error: Task request timed out
n8n-worker-1 | at ErrorReporter.wrap (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/errors/error-reporter.ts:242:37)
n8n-worker-1 | at ErrorReporter.error (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/errors/error-reporter.ts:228:25)
n8n-worker-1 | at LocalTaskRequester.requestExpired (/usr/local/lib/node_modules/n8n/src/task-runners/task-managers/task-requester.ts:309:22)
n8n-worker-1 | at LocalTaskRequester.onMessage (/usr/local/lib/node_modules/n8n/src/task-runners/task-managers/task-requester.ts:272:10)
n8n-worker-1 | at TaskBroker.handleRequestTimeout (/usr/local/lib/node_modules/n8n/src/task-runners/task-broker/task-broker.service.ts:115:50)
n8n-worker-1 | at Timeout. (/usr/local/lib/node_modules/n8n/src/task-runners/task-broker/task-broker.service.ts:102:9)
n8n-worker-1 | at listOnTimeout (node:internal/timers:588:17)
n8n-worker-1 | at processTimers (node:internal/timers:523:7)
n8n-worker-1 |
n8n-worker-1 | Task request timed out after 60 seconds
n8n-worker-1 | Worker finished execution 198 (job 195)

root@root:/home/rootroot/n8n# docker compose logs n8n-worker-task-runner
n8n-worker-task-runner-1 | 2026/02/17 14:15:34 INFO Starting launcher’s health check server at port 5680
n8n-worker-task-runner-1 | 2026/02/17 14:15:34 INFO [launcher:py] Starting launcher goroutine…
n8n-worker-task-runner-1 | 2026/02/17 14:15:34 INFO [launcher:js] Starting launcher goroutine…
n8n-worker-task-runner-1 | 2026/02/17 14:15:34 INFO [launcher:py] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:15:34 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:16:38 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:16:38 INFO [launcher:py] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:18:05 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:18:15 WARN [launcher:js] Found runner unresponsive (2/6)
n8n-worker-task-runner-1 | 2026/02/17 14:18:25 WARN [launcher:js] Found runner unresponsive (3/6)
n8n-worker-task-runner-1 | 2026/02/17 14:18:43 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:18:44 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:18:44 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:18:44 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:18:57 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:19:21 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:41:45 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:42:08 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:42:08 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:42:08 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:42:09 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:42:22 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:42:45 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:42:45 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:42:45 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:42:46 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:42:59 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:43:25 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:43:25 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:43:25 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:43:25 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:43:38 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:44:03 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:44:03 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:44:03 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:44:03 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:44:16 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:44:40 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:44:40 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:44:40 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:44:40 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:44:53 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:45:18 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:45:18 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:45:18 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:47:26 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:47:51 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:47:51 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:47:51 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:47:51 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:48:04 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:48:30 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:48:30 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:48:30 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:48:30 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:48:43 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:49:07 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:49:07 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:49:07 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:49:07 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:49:20 WARN [launcher:js] Found runner unresponsive (1/6)
n8n-worker-task-runner-1 | 2026/02/17 14:49:45 ERROR [runner:js] Shutdown timeout reached, forcing shutdown…
n8n-worker-task-runner-1 | 2026/02/17 14:49:45 ERROR [launcher:js] Runner process exited with error: exit status 1
n8n-worker-task-runner-1 | 2026/02/17 14:49:45 INFO [launcher:js] Waiting for task broker to be ready…
n8n-worker-task-runner-1 | 2026/02/17 14:49:45 INFO [launcher:js] Waiting for launcher’s task offer to be accepted…
n8n-worker-task-runner-1 | 2026/02/17 14:49:58 WARN [launcher:js] Found runner unresponsive (1/6)

ok i think we’re close

are you sure that N8N_RUNNERS_AUTH_TOKEN is the same exact value in env vars for all services?

yes its the same

oh wait:

actually I think it is working correctly since we see Worker finished execution 198,

but I suspect you are testing with tasks that take longer than 60 seconds, right?

If that is the case, you need to add this env var to both the task runner and the worker:

N8N_RUNNERS_TASK_TIMEOUT=300

This ensures it won’t time out unless it hits 5 minutes (300 seconds),

Also, try changing your auth token to something simple like test123 for now (avoiding special characters) to rule out parsing issues:

N8N_RUNNERS_AUTH_TOKEN=test123

If it’s still not working, just paste your final compose file after all the edits and I will try running it on my side to help replicate the issue..

still the same problem!

services:
  n8n-db:
    image: postgres:16.1
    restart: always
    environment:
      - POSTGRES_DB=n8n
      - POSTGRES_PASSWORD=n8n
      - POSTGRES_USER=n8n
    volumes:
      - postgres-data:/var/lib/postgresql/data

  n8n-redis:
    image: redis:7-alpine
    restart: always
    volumes:
      - redis-data:/data

  n8n-main:
    image: n8nio/n8n
    restart: always
    depends_on:
      - n8n-db
      - n8n-redis
    volumes:
      - n8n-data:/home/node/.n8n
    ports:
      - 5678:5678
    environment:
      - WEBHOOK_URL=https://n8nv2.test.com
      - N8N_HOST=n8nv2.test.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - N8N_SECURE_COOKIE=true
      - EXECUTIONS_MODE=queue
      - N8N_TRUST_PROXY=true
      - N8N_PROXY_HOPS=1
      # Task runner configuration for v2 (external mode)
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - N8N_RUNNERS_AUTH_TOKEN=test123
      # Security settings
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
      - N8N_BLOCK_ENV_ACCESS_IN_NODE=true
      - N8N_SKIP_AUTH_ON_OAUTH_CALLBACK=false
      # File access restriction
      - N8N_RESTRICT_FILE_ACCESS_TO=/home/node/.n8n-files
      # Binary data configuration (filesystem mode for regular mode)
      - N8N_DEFAULT_BINARY_DATA_MODE=filesystem
      - NODE_FUNCTION_ALLOW_BUILTIN=crypto
      - OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_HOST=n8n-db
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_SCHEMA=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - DB_POSTGRESDB_POOL_SIZE=40
      - DB_POSTGRESDB_CONNECTION_TIMEOUT=30000
      # Queue mode configuration
      - QUEUE_BULL_REDIS_HOST=n8n-redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_DB=0

  n8n-worker:
    image: n8nio/n8n
    restart: always
    command: worker --concurrency=6
    depends_on:
      - n8n-db
      - n8n-redis
    volumes:
      - n8n-data:/home/node/.n8n
    environment:
      - EXECUTIONS_MODE=queue
      - WEBHOOK_URL=https://n8nv2.test.com
      - N8N_HOST=n8nv2.test.com
      - N8N_SKIP_DB_INIT=true
      # Task runner configuration for v2 (external mode)
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - N8N_RUNNERS_TASK_TIMEOUT=300
      - N8N_RUNNERS_AUTH_TOKEN=test123
      - N8N_PROCESS=worker
      # Security settings
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
      - N8N_BLOCK_ENV_ACCESS_IN_NODE=true
      # File access restriction
      - N8N_RESTRICT_FILE_ACCESS_TO=/home/node/.n8n-files
      - NODE_FUNCTION_ALLOW_BUILTIN=crypto
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_HOST=n8n-db
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_SCHEMA=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - DB_POSTGRESDB_POOL_SIZE=40
      - DB_POSTGRESDB_CONNECTION_TIMEOUT=30000
      # Queue mode configuration
      - QUEUE_BULL_REDIS_HOST=n8n-redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_DB=0

  # Task runner for n8n-worker with Python support for v2
  n8n-worker-task-runner:
    image: n8nio/runners
    restart: always
    depends_on:
      - n8n-worker
    environment:
      # Task runner configuration
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_TASK_BROKER_URI=http://n8n-worker:5679
      - N8N_RUNNERS_TASK_TIMEOUT=300
      - N8N_RUNNERS_AUTH_TOKEN=test123
      # Enable Python and JavaScript support
      - N8N_RUNNERS_ENABLED_TASK_TYPES=javascript,python
      # Auto shutdown after 15 seconds of inactivity
      - N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15
    volumes:
      # Shared volume for file access if needed
      - n8n-data:/home/node/.n8n

volumes:
  postgres-data:
  redis-data:
  n8n-data:

Hi @Nac

I’ve tested your docker configuration without any modification, it works on my side
You may try to update all docker image version to latest (for image n8nio/n8n and n8nio/runners)

Refered to the error log in the stack you sent
n8n-main-1 | Error tracking disabled because this release is older than 6 weeks.

thanks,

I just deployed this exact compose file in my lab now and can confirm it’s working:

What does your backend setup look like? Do you use Coolify, Portainer, etc.?

I guess it’s a connection or auth issue specifically with the task runner, since this log clearly explains it:

i m working on vm ubuntu 24.04 under proxmox. (selfhosted)

how i can locate the issue exactly ?

I haven’t worked with proxmox before tbh,

but if you can execute commands, let’s try this:

wget -qO- http://n8n-worker:5679/healthz

It should return ok if everything is correct:

image