Task execution aborted because runner became unresponsive

Hey everyone :waving_hand:

I’ve been working on scaling a pretty beefy n8n instance and running into some weird issues with task runners, even though my server barely uses 15% of its resources, I keep seeing random failures on workflows with Code nodes.

What is the error message (if any)?

Task execution aborted because runner became unresponsive

The task runner failed to respond as expected, so it was considered unresponsive, and the task was aborted. You can try the following:

1. Optimize your script to prevent CPU-intensive operations, e.g. by breaking them down into smaller chunks or batch processing.
2. Ensure that all paths in your script are able to terminate, i.e. no infinite loops.
3. If your task can reasonably keep the task runner busy for more than 30 seconds, increase the heartbeat interval using the N8N_RUNNERS_HEARTBEAT_INTERVAL environment variable.

My setup

I’m running everything via Docker on a dedicated Hetzner server with:

  • 16 vCPU
  • 32 GB RAM
  • SSD storage

It’s not even sweating — CPU hovers around 10–15% during heavy workflows.

Here’s my current Docker config for the main instance:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n

    environment:
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=internal
      - N8N_RUNNERS_MAX_CONCURRENCY=100
      - N8N_RUNNERS_MAX_OLD_SPACE_SIZE=16384
      - N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=0
      - N8N_RUNNERS_AUTH_TOKEN=X
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgresql
      - DB_POSTGRESDB_PORT=X
      - DB_POSTGRESDB_DATABASE=X
      - DB_POSTGRESDB_USER=X
      - DB_POSTGRESDB_PASSWORD=X
      - GENERIC_TIMEZONE=Europe/Berlin
      - TZ=Europe/Berlin
    volumes:
      - n8n-data:/home/node/.n8n
    depends_on:
      postgresql:
        condition: service_healthy

What I’ve already tried

  • Bumped up N8N_RUNNERS_MAX_CONCURRENCY from 5 → X
  • Increased memory limits
  • Used different health check methods
  • Watched server logs — nothing abnormal

Still, same issues: task runners get stuck or randomly crash under load, even when the load is low. Based on that i’m not even sure that N8N_RUNNERS_MODE=external will fix the issue.

n8n setup

  • n8n version: 1.98.2
  • Database: PostgreSQL 16
  • Running via: Docker
  • OS: Ubuntu 24.04 LTS

Thanks for your help here