Task runner question

Hi,
What does the following error messages mean when I’m checking the logs of my docker container

Task (jGkNRjMr) rejected by Runner with reason "Offer expired and no open task slots"

timeout exceeded when trying to connect

Information on your n8n setup

  • n8n version: 1.80.5
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

Hey Anthony! Let’s break this down.

1. “Offer expired and no open task slots”

This happens when n8n’s task runner is overwhelmed. Think of it like a busy coffee shop barista—your tasks (coffee orders) pile up, and the system says, “Nope, too busy, try later.”

Why it happens:

  • Concurrency limits: n8n’s default task runner only handles ~10 tasks at once. If your workflows are heavy/parallel, it hits this cap.
  • Long-running tasks: Tasks stuck in “running” state (due to crashes) block slots.

Fix:

  • Increase concurrency: Add to your docker-compose.yml:
    environment:  
      - EXECUTIONS_PROCESS=main  
      - N8N_CONCURRENCY=50  # Adjust based on your server's CPU/RAM  
    
  • Kill zombie tasks: Check Postgres for stuck executions:
    SELECT * FROM execution_entity WHERE status = 'running';  -- Manually update to 'failed' if needed  
    

2. “Timeout exceeded when trying to connect”

This is your n8n instance struggling to talk to Postgres (or another service).

Common culprits:

  • Maxed-out Postgres connections:
    SHOW max_connections;  -- Default is often 100  
    
  • Network latency: Docker’s internal DNS or slow queries.

Fix:

  • Boost Postgres connections:
    ALTER SYSTEM SET max_connections = 200;  -- Then restart Postgres  
    
  • Optimize queries: Add indexes to slow tables (e.g., execution_entity).
  • Add retries: In n8n nodes calling external APIs, enable Retry On Fail.

Pro Tips:

  1. Upgrade n8n: Version 1.80.5 is old—try 1.84+ (critical task-runner fixes!).
  2. Monitor RAM/CPU: Use docker stats to check if your container is gasping for resources.
  3. Check Postgres logs: Look for too many connections or slow queries.

Still stuck? Share:

  • Your Postgres max_connections and idle_in_transaction_session_timeout settings.
  • A snippet of n8n logs when the timeout occurs.

You’ve got this!

Best,
Dandy

Thank you for the reply.
The concurrency env variable is actually named “N8N_CONCURRENCY_PRODUCTION_LIMIT” already set to 20
I don’t have Kill zombie tasks and upgraded a few weeks ago to recent version (curently on 1.84.3, but I still receive errors like "rejected by Runner with reason “Offer expired and no open task slots” when activating N8N_RUNNERS_ENABLED=true
I’m on a single node, resources are used at 40%
vCPU: 4
Memory: 16 GB

Hey Anthony, since you’ve already tried a few things and the issue’s still there… have you tried this?

Try disabling the runners for a bit — just comment out N8N_RUNNERS_ENABLED=true and set EXECUTIONS_PROCESS=main. Then bump up N8N_CONCURRENCY (the regular one, not _PRODUCTION_LIMIT) to something like 50, or whatever your server can handle.

This helps check if the problem’s coming from the way n8n is distributing executions between runners on a single-node setup. Sometimes it tries to hand off tasks to a runner that’s not ready yet or already full, and that’s when you get that “offer expired” error.

Also, have a look at the logs and see if you find something like:

Runner registered and ready to receive executions

If that doesn’t show up quickly during startup, n8n might be offering tasks before the runner is actually ready to handle them.

Even with plenty of CPU and RAM left, if your executions are heavy or there are lots happening at once, you could still run into a bit of an internal queue bottleneck.

Give this no-runner setup a shot and let me know if things improve. If it helps, we can think about moving to a multi-container setup later, or even something more scalable with load balancing.

And yeah, I gotta keep it short here or they’ll think I’m AI again :joy:

Cheers,
Dandy

I don’t see any references in the docs to a N8N_CONCURRENCY env variable and
EXECUTIONS_PROCESS is marked as deprecated

I encountered the same problem as you and couldn’t find the answer in the document