Worker with task runner hangs on Code Node

Describe the problem/error/question

I want to use Task runners for my workers in n8n, but it seems to hang on every attempt

What is the error message (if any)?

There is no error message; it just said Running X node, and don’t have any results and timed out after 5 minutes

Please share your workflow


Share the output returned by the last node

Information on your n8n setup

  • n8n version: latest (1.97.1)
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default (own)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows and Linux

Here is the logs

2025-06-16T08:34:00.140Z | info |
n8n worker is now ready {"scopes":["scaling"],"file":"worker.js","function":"run"}
2025-06-16T08:34:00.140Z | info |  * Version: 1.97.1 {"scopes":["scaling"],"file":"worker.js","function":"run"}
2025-06-16T08:34:00.141Z | info |  * Concurrency: 10 {"scopes":["scaling"],"file":"worker.js","function":"run"}
2025-06-16T08:34:00.141Z | info |  {"scopes":["scaling"],"file":"worker.js","function":"run"}
2025-06-16T08:34:00.203Z | debug | Worker server initialized {"scopes":["scaling"],"endpoints":["health","overwrites","metrics"],"file":"worker-server.js","function":"init"}
2025-06-16T08:34:00.204Z | info |
n8n worker server listening on port 5678 {"scopes":["scaling"],"file":"worker-server.js","function":"init"}
2025-06-16T08:34:02.457Z | info | Registered runner "JS Task Runner" (gCMIoIRFptvNeenO-q_8F)  {"file":"task-broker-ws-server.js","function":"onMessage"}
2025-06-16T08:34:40.609Z | info | Worker started execution 20 (job 20) {"scopes":["scaling"],"executionId":"20","jobId":"20","file":"job-processor.js","function":"processJob"}
2025-06-16T08:34:41.955Z | debug | Execution ID 20 will run executing all nodes. {"executionId":"20","file":"manual-execution.service.js","function":"runManually"}
2025-06-16T08:34:41.958Z | debug | Workflow execution started {"workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:41.967Z | debug | Executing hook (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:41.969Z | debug | Start executing node "Zalo Message Trigger" {"node":"Zalo Message Trigger","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:41.970Z | debug | Executing hook on node "Zalo Message Trigger" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:41.971Z | debug | Running node "Zalo Message Trigger" finished successfully {"node":"Zalo Message Trigger","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:41.974Z | debug | Executing hook on node "Zalo Message Trigger" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:41.975Z | debug | Start executing node "Khang Message Only" {"node":"Khang Message Only","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:41.977Z | debug | Executing hook on node "Khang Message Only" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:41.978Z | debug | Running node "Khang Message Only" started {"node":"Khang Message Only","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:41.979Z | debug | Running node "Khang Message Only" finished successfully {"node":"Khang Message Only","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:41.980Z | debug | Executing hook on node "Khang Message Only" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:41.981Z | debug | Start executing node "Check Delete All" {"node":"Check Delete All","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:41.982Z | debug | Executing hook on node "Check Delete All" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:41.982Z | debug | Running node "Check Delete All" started {"node":"Check Delete All","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.037Z | debug | Running node "Check Delete All" finished successfully {"node":"Check Delete All","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.039Z | debug | Executing hook on node "Check Delete All" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:42.040Z | debug | Start executing node "Prepare Save Data" {"node":"Prepare Save Data","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.041Z | debug | Executing hook on node "Prepare Save Data" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:42.041Z | debug | Running node "Prepare Save Data" started {"node":"Prepare Save Data","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.075Z | debug | Running node "Prepare Save Data" finished successfully {"node":"Prepare Save Data","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.076Z | debug | Executing hook on node "Prepare Save Data" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:42.077Z | debug | Start executing node "Save User Message" {"node":"Save User Message","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.078Z | debug | Executing hook on node "Save User Message" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:42.079Z | debug | Running node "Save User Message" started {"node":"Save User Message","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.090Z | debug | Published pubsub msg: relay-execution-lifecycle-event (executionStarted) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"executionStarted","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.091Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.092Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.092Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.092Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.092Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.093Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.093Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.093Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.093Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.148Z | debug | Running node "Save User Message" finished successfully {"node":"Save User Message","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.149Z | debug | Executing hook on node "Save User Message" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:42.149Z | debug | Start executing node "Wait for burst chatting window" {"node":"Wait for burst chatting window","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.150Z | debug | Executing hook on node "Wait for burst chatting window" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:34:42.151Z | debug | Running node "Wait for burst chatting window" started {"node":"Wait for burst chatting window","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:34:42.153Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:34:42.153Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.152Z | debug | Running node "Wait for burst chatting window" finished successfully {"node":"Wait for burst chatting window","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.154Z | debug | Executing hook on node "Wait for burst chatting window" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.154Z | debug | Start executing node "Get Chat History" {"node":"Get Chat History","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.155Z | debug | Executing hook on node "Get Chat History" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.156Z | debug | Running node "Get Chat History" started {"node":"Get Chat History","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.158Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.158Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.173Z | debug | Running node "Get Chat History" finished successfully {"node":"Get Chat History","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.174Z | debug | Executing hook on node "Get Chat History" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.175Z | debug | Start executing node "Check if latest message" {"node":"Check if latest message","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.176Z | debug | Executing hook on node "Check if latest message" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.176Z | debug | Running node "Check if latest message" started {"node":"Check if latest message","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.200Z | debug | Running node "Check if latest message" finished successfully {"node":"Check if latest message","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.201Z | debug | Executing hook on node "Check if latest message" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.202Z | debug | Start executing node "Format History" {"node":"Format History","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.204Z | debug | Executing hook on node "Format History" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.205Z | debug | Running node "Format History" started {"node":"Format History","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.212Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.213Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.213Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.213Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.333Z | debug | Running node "Format History" finished successfully {"node":"Format History","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.334Z | debug | Executing hook on node "Format History" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.335Z | debug | Start executing node "Prompt to Classify Intent" {"node":"Prompt to Classify Intent","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.336Z | debug | Executing hook on node "Prompt to Classify Intent" (hookFunctionsPush) {"executionId":"20","pushRef":"jxdeyayjl1","workflowId":"uSgMaHUpean4yRII","file":"execution-lifecycle-hooks.js"}
2025-06-16T08:35:02.336Z | debug | Running node "Prompt to Classify Intent" started {"node":"Prompt to Classify Intent","workflowId":"uSgMaHUpean4yRII","file":"logger-proxy.js","function":"exports.debug"}
2025-06-16T08:35:02.338Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteAfter) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteAfter","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.338Z | debug | Published pubsub msg: relay-execution-lifecycle-event (nodeExecuteBefore) {"scopes":["scaling","pubsub"],"msg":"relay-execution-lifecycle-event","channel":"n8n.commands","type":"nodeExecuteBefore","executionId":"20","file":"publisher.service.js","function":"publishCommand"}
2025-06-16T08:35:02.391Z | error | Unrecognized node type: n8n-nodes-base.googleSheetsTool {"file":"error-reporter.js","function":"defaultReport"}

P/s: There is also an error on base n8n google sheet tool for some reason, but the tool is used in the AI Agent after the “Prompt to Classify Intent” node so i don’t think it’s related

My current setup.

# Shared configurations
x-shared-environment: &shared-environment
  # Queue & Redis
  EXECUTIONS_MODE: ${EXECUTIONS_MODE:-queue}
  QUEUE_BULL_REDIS_HOST: ${QUEUE_BULL_REDIS_HOST:-redis}
  QUEUE_BULL_REDIS_PORT: ${QUEUE_BULL_REDIS_PORT:-6379}
  OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS: ${OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS:-true}
  # Security & Extensibility
  N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
  NODE_FUNCTION_ALLOW_EXTERNAL: ${NODE_FUNCTION_ALLOW_EXTERNAL:-*}
  NODE_FUNCTION_ALLOW_BUILTIN: ${NODE_FUNCTION_ALLOW_BUILTIN:-*}
  N8N_DEFAULT_BINARY_DATA_MODE: ${N8N_DEFAULT_BINARY_DATA_MODE:-filesystem}
  N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: ${N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS:-true}
  N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE: ${N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE:-true}
  CREDENTIALS_OVERWRITE_ENDPOINT: ${CREDENTIALS_OVERWRITE_ENDPOINT:-send-credentials}
  # Database
  DB_TYPE: ${DB_TYPE:-postgresdb}
  DB_POSTGRESDB_HOST: ${DB_POSTGRESDB_HOST:-postgres}
  DB_POSTGRESDB_PORT: ${DB_POSTGRESDB_PORT:-5432}
  DB_POSTGRESDB_DATABASE: ${DB_POSTGRESDB_DATABASE:-n8n}
  DB_POSTGRESDB_USER: ${DB_POSTGRESDB_USER:-n8n}
  DB_POSTGRESDB_PASSWORD: ${DB_POSTGRESDB_PASSWORD}
  DB_POSTGRESDB_POOL_SIZE: ${DB_POSTGRESDB_POOL_SIZE:-20}
  DB_POSTGRESDB_SSL_MODE: ${DB_POSTGRESDB_SSL_MODE:-disable}
  # Time & Locale
  TZ: ${TZ:-Asia/Ho_Chi_Minh}
  GENERIC_TIMEZONE: ${GENERIC_TIMEZONE:-Asia/Ho_Chi_Minh}
  # Debugging & Logging
  N8N_LOG_LEVEL: ${N8N_LOG_LEVEL:-debug}
  N8N_LOG_OUTPUT: ${N8N_LOG_OUTPUT:-console}
  N8N_DIAGNOSTICS_ENABLED: ${N8N_DIAGNOSTICS_ENABLED:-true}
  # Task Runners
  N8N_RUNNERS_ENABLED: ${N8N_RUNNERS_ENABLED:-true}
  N8N_RUNNERS_MODE: ${N8N_RUNNERS_MODE:-internal}
  N8N_RUNNERS_AUTH_TOKEN: ${N8N_RUNNERS_AUTH_TOKEN}
  N8N_RUNNERS_MAX_OLD_SPACE_SIZE: ${N8N_RUNNERS_MAX_OLD_SPACE_SIZE:-16384}
  NODE_OPTIONS: ${NODE_OPTIONS:---max-old-space-size=16384}
  N8N_RUNNERS_MAX_PAYLOAD: ${N8N_RUNNERS_MAX_PAYLOAD:-2147483648}

# Shared service configuration
x-n8n-common: &n8n-common
  image: n8nio/n8n:${N8N_VERSION:-latest}
  restart: unless-stopped
  environment:
    <<: *shared-environment
  volumes:
    - n8n_data:/home/node/.n8n
  networks:
    - n8n_network

services:
  n8n:
    <<: *n8n-common
    container_name: n8n
    ports:
      - "${N8N_PORT:-5678}:5678"
      - "${N8N_METRICS_PORT:-5679}:5679"
    environment:
      <<: *shared-environment
      N8N_HOST: ${N8N_HOST:-0.0.0.0}
      N8N_EDITOR_BASE_URL: ${N8N_EDITOR_BASE_URL}
      WEBHOOK_URL: ${WEBHOOK_URL}
      WEBHOOK_TUNNEL_URL: ${WEBHOOK_TUNNEL_URL}
    depends_on:
      - redis
      - postgres
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://localhost:5678/healthz"]
      interval: 5s
      timeout: 5s
      retries: 10

  n8n_worker:
    <<: *n8n-common
    command: worker
    depends_on:
      n8n:
        condition: service_healthy

  redis:
    image: redis:alpine
    container_name: n8n_redis
    restart: unless-stopped
    networks:
      - n8n_network
    volumes:
      - n8n_redis_data:/data
    command: redis-server --appendonly yes

  postgres:
    image: postgres:${POSTGRES_VERSION:-latest}
    container_name: n8n_postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: ${DB_POSTGRESDB_USER:-n8n}
      POSTGRES_PASSWORD: ${DB_POSTGRESDB_PASSWORD}
      POSTGRES_DB: ${DB_POSTGRESDB_DATABASE:-n8n}
    volumes:
      - n8n_postgres_data:/var/lib/postgresql/data
    networks:
      - n8n_network

volumes:
  n8n_data:
  n8n_redis_data:
  n8n_postgres_data:

networks:
  n8n_network:
    driver: bridge
1 Like

I thinks i figured out why

I was using $item($itemIndex).$node[‘Zalo Message Trigger’].json.message.threadId to get the the field i needed for the code node. But this is somehow hangs with task runners, so i switched to $(‘Zalo Message Trigger’).first().json.message.threadId; and it works