External Runners

Describe the problem/error/question:

JavaScript code node executions are not being picked up by the external runners at all which ceases operation of workflows that depend upon the node.

What is the error message (if any)?

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.

Please share your workflow

The workflow contents are irrelevant: I cannot get a simple workflow with an unmodified code node to execute the code node

Information on your n8n setup

  • n8n version: 2.3.2
  • Database (default: SQLite): PostgreSQL
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Podman Quadlets (essentially Docker for these purposes)
  • Operating system: Fedora 43 Server

Current environment settings (.env file shared by the n8n-main, n8n-runner-1, and n8n-worker-1 containers):

N8N_HOST=n8n-main
WEBHOOK_URL=https://n8n.REDACTED.com

N8N_PORT=5678
N8N_PROTOCOL=https
NODE_ENV=production
N8N_AUTH_EXCLUDE_ENDPOINTS=api
N8N_ENCRYPTION_KEY=REDACTED
N8N_SECURE_COOKIE=false
N8N_PROXY_HOPS=1

N8N_RESTRICT_FILE_ACCESS_TO=“/home/node”
N8N_BLOCK_ENV_ACCESS_IN_NODE=false
N8N_RUNNERS_AUTH_TOKEN=REDACTED
N8N_RUNNERS_TASK_BROKER_URI=http://n8n-main:5679

QUEUE_BULL_REDIS_HOST=n8n-redis
QUEUE_BULL_REDIS_PORT=6379
CACHE_ENABLE=true
CACHE_TYPE=redis
CACHE_REDIS_HOST=redis

DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=n8n-postgres
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_DATABASE=REDACTED
DB_POSTGRESDB_USER=REDACTED
DB_POSTGRESDB_PASSWORD=REDACTED

GENERIC_TIMEZONE=America/Denver
N8N_METRICS_ENABLED=true
N8N_METRICS=true
N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL=true
N8N_METRICS_INCLUDE_NODE_TYPE_LABEL=true
N8N_METRICS_INCLUDE_CREDENTIAL_TYPE_LABEL=true
N8N_METRICS_INCLUDE_QUEUE_METRICS=true
N8N_HIRING_BANNER_ENABLED=false
N8N_ONBOARDING_FLOW_DISABLED=true
N8N_LOG_LEVEL=debug

OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true

EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=168
EXECUTIONS_TIMEOUT=36000

N8N_GIT_NODE_DISABLE_BARE_REPOS=true
N8N_DIAGNOSTICS_ENABLED=false
N8N_LOG_FORMAT=text
N8N_SECURITY_AUDIT_DAYS_ABANDONED_WORKFLOW=365
WORKFLOWS_DEFAULT_NAME=ausOz
N8N_WORKFLOW_CALLER_POLICY_DEFAULT_OPTION=any
N8N_REINSTALL_MISSING_PACKAGES=true
CODE_ENABLE_STDOUT=true
N8N_UNVERIFIED_PACKAGES_ENABLED=true
N8N_BLOCK_ENV_ACCESS_IN_NODE=false
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
NODE_FUNCTION_ALLOW_BUILTIN=true
N8N_PAYLOAD_SIZE_MAX=1024

N8N_RUNNERS_MODE=external
N8N_RUNNERS_AUTH_TOKEN=REDACTED

N8N_RUNNERS_MAX_CONCURRENCY=10
NODES_EXCLUDE=

The n8n-main container has an additional environment setting:

N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0

I can provide detailed logs as well, upon request, but have been banging my head against a wall trying to solve this for the last day and a half.

What am I missing? I really hope this is resolvable as it is not negotiable the use of the code nodes and didn’t expect the update to go so rough.

Hi @Buggy_Arbor,

I am assuming you’re running in queue mode. If so, then you must point your runner to the worker’s broker. See below post where I have an example docker compose. My runner points to the worker and not the main instance.