Tips > Reliability & Performance

Set Production Concurrency Limits to Prevent Resource Exhaustion

Without concurrency limits, n8n will attempt to execute as many workflows simultaneously as events arrive.

Without concurrency limits, n8n runs as many workflows simultaneously as events arrive, which can exhaust memory and crash the process during spikes. Set N8N_CONCURRENCY_PRODUCTION_LIMIT to cap concurrent production executions, and set per-worker concurrency in queue mode. Size the limit to available RAM so bursts queue instead of overwhelming the host.

Why set concurrency limits in n8n?

Without concurrency limits, n8n will attempt to execute as many workflows simultaneously as events arrive. During traffic spikes or bulk operations, this can exhaust memory, saturate CPU, and crash the process.

Real-world example: A webhook endpoint receives 500 events in 10 seconds during a bulk import. n8n attempts to execute 500 workflows concurrently, consuming 8 GB of RAM and crashing the container.

How do you configure concurrency limits?


# .env configuration

# Limit concurrent production (webhook/trigger) executions

N8N_CONCURRENCY_PRODUCTION_LIMIT=20

# For queue mode workers, set per-worker concurrency

# (set this on each worker's environment)

QUEUE_WORKER_CONCURRENCY=10

Sizing guidelines:

Deployment SizeRAMRecommended N8N_CONCURRENCY_PRODUCTION_LIMIT
Small (2 GB RAM)2 GB5-10
Medium (4 GB RAM)4 GB15-25
Large (8 GB RAM)8 GB30-50
Queue worker4 GB10-15 per worker

A full production-optimized .env example:


# Full production-optimized .env example

N8N_CONCURRENCY_PRODUCTION_LIMIT=20
EXECUTIONS_MODE=queue
QUEUE_BULL_REDIS_HOST=redis
QUEUE_WORKER_CONCURRENCY=10
N8N_PAYLOAD_SIZE_MAX=128
N8N_DEFAULT_BINARY_DATA_MODE=filesystem
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=168
EXECUTIONS_DATA_SAVE_ON_SUCCESS=none
EXECUTIONS_DATA_SAVE_ON_ERROR=all
NODE_OPTIONS=--max-old-space-size=4096
DB_TYPE=postgresdb

What happens when the limit is reached?

Warning: Backpressure Behavior. When the concurrency limit is reached, new executions queue up in memory (main mode) or in Redis (queue mode). In main mode, if too many executions queue up, the process can still run out of memory. Queue mode with Redis is the robust solution for high-throughput workloads.

Related: Flatten Deeply Nested API Responses · Use Docker Compose with Health Checks for n8n and PostgreSQL

Showcase builds

19 complete workflows from my own projects, each with its n8n workflow JSON to import. Showcase entries link the file at the end of the article.

See the showcase builds

Keep reading

190 entries grouped by topic, from first workflow to queue mode. Free, no signup.

Browse the encyclopedia

Need it built?

I design, build and run n8n systems for clients. Every engagement starts with a $1,500 diagnostic audit, credited toward the build.

Book an introductory call