KEEP LEARNING
Build the bigger picture.
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
Tips > Reliability & Performance
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.
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.
# .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=10Sizing guidelines:
| Deployment Size | RAM | Recommended N8N_CONCURRENCY_PRODUCTION_LIMIT |
|---|---|---|
| Small (2 GB RAM) | 2 GB | 5-10 |
| Medium (4 GB RAM) | 4 GB | 15-25 |
| Large (8 GB RAM) | 8 GB | 30-50 |
| Queue worker | 4 GB | 10-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=postgresdbWarning: 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
KEEP LEARNING
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
APPLY IT TO YOUR SYSTEM
Bring the process, the tools involved and an example of where the current workflow gets stuck.