<figure class="wp-block-image aligncenter"><img src="https://flowgenius.in/wp-content/uploads/2026/01/n8n-queue-mode-docker-compose-issues.png" alt="Step by Step Guide to solve n8n queue mode docker compose issues" /><figcaption style="text-align: center;">Step by Step Guide to solve n8n queue mode docker compose issues</p>
<hr />
</figcaption></figure>
<p style="margin-bottom: 2em; line-height: 1.9;"><strong>Who this is for:</strong> Developers and DevOps engineers deploying n8n with Docker‑Compose who need reliable queue mode operation. <strong>We cover this in detail in the </strong><a href="https://flowgenius.in/n8n-queue-mode-error-guide/">n8n Queue Mode Errors Guide.</a></p>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">Quick Diagnosis</h2>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">#</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Symptom</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Immediate Fix</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">1</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Error: Could not connect to Redis</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Verify REDIS_HOST, REDIS_PORT, REDIS_PASSWORD; ensure the Redis container is healthy.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">2</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Queue mode disabled – missing “queueMode” flag</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Add -e EXECUTIONS_PROCESS=queue (or -e QUEUE_MODE=1 for legacy images) to <strong>both</strong> n8n and n8n‑worker.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">3</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">docker compose up exits with “service … failed to start”</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Add a healthcheck for Redis and use depends_on with condition: service_healthy.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">4</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Jobs stay <strong>pending</strong></td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Confirm the n8n‑worker container runs with the same queue env vars as the UI container.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">5</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">“connection reset by peer”</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Raise Redis timeout and increase Docker‑Compose memory limits; avoid CPU/memory starvation.</td>
</tr>
</tbody>
</table>
<p style="margin-bottom: 2em; line-height: 1.9;">Apply the first fix that matches your logs; each step below explains the why and how.</p>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">1. Verify Redis Connectivity: The Core of Queue Mode</h2>
<p><strong>If you encounter any </strong><a href="/n8n-queue-mode-ssl-misconfiguration">n8n queue mode ssl misconfiguration </a><strong>resolve them before continuing with the setup.</strong></p>
<p style="margin-bottom: 2em; line-height: 1.9;">Queue mode stores execution payloads in a single Redis instance (or cluster). If n8n cannot reach Redis it silently falls back to the default “process” mode.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">1.1 Essential environment variables</h3>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Variable</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Recommended value</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">EXECUTIONS_PROCESS</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">queue</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Switches n8n from the default main process to queue mode.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">REDIS_HOST</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">redis (service name)</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Must match the Redis service name in the same compose file.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">REDIS_PORT</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">6379</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Default Redis port; change only if you expose a non‑standard port.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">REDIS_PASSWORD</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">(optional)</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Set when the Redis container uses requirepass.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">REDIS_TLS</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">true/false</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Enable for TLS‑enabled Redis.</td>
</tr>
</tbody>
</table>
<blockquote style="margin: 0 0 2em 0; padding: 15px; background: #f9f9f9; border-left: 4px solid #ccc;">
<p style="margin: 0; line-height: 1.9;"><strong>EEFA note</strong> – In production always set REDIS_PASSWORD and enable TLS (REDIS_TLS=true). Missing these can cause silent connection failures that are hard to debug.</p>
</blockquote>
<h3 style="margin-bottom: 45px; line-height: 1.3;">1.2 Minimal working Docker‑Compose – Redis service</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;">services:
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">The Redis container runs with AOF persistence and a healthcheck that returns PONG when ready.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">1.3 Minimal working Docker‑Compose: n8n UI container</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;"> n8n:
image: n8nio/n8n:latest
restart: unless-stopped
ports:
- "5678:5678"
environment:
- EXECUTIONS_PROCESS=queue
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
depends_on:
redis:
condition: service_healthy
volumes:
- n8n_data:/home/node/.n8n
command: ["n8n", "start"]</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">*The UI container is configured to use queue mode and waits for a healthy Redis service.*</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">1.4 Minimal working Docker‑Compose – n8n worker container</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;"> n8n-worker:
image: n8nio/n8n:latest
restart: unless-stopped
environment:
- EXECUTIONS_PROCESS=queue
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
depends_on:
redis:
condition: service_healthy
command: ["n8n", "worker"]
volumes:
- n8n_data:/home/node/.n8n</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">Both UI and worker share identical Redis settings; the worker processes queued jobs.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">1.5 Connectivity checklist</h3>
<ul style="margin-bottom: 1.8em; line-height: 1.9;">
<li>Run <code>docker compose exec redis redis-cli ping</code> → <strong>PONG</strong>.</li>
<li>Search n8n logs for “Connected” with <code>docker compose logs n8n | grep -i redis</code>.</li>
<li>Ensure no <code>AUTH</code> errors appear.</li>
</ul>
<p style="margin-bottom: 2em; line-height: 1.9;">If any check fails, adjust REDIS_HOST, REDIS_PORT, or REDIS_PASSWORD and redeploy.</p>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">2. Run Both UI and Worker in Queue Mode</h2>
<p style="margin-bottom: 2em; line-height: 1.9;">Launching only the UI container in queue mode leaves jobs stranded.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">2.1 Dual‑service pattern</h3>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Service</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Required env vars</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Critical flag</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">n8n (Web UI)</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">EXECUTIONS_PROCESS=queue + Redis vars</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Must expose port 5678</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">n8n-worker</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Same as UI</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Executes queued jobs</td>
</tr>
</tbody>
</table>
<p style="margin-bottom: 2em; line-height: 1.9;">Both containers must <strong>exactly</strong> match the Redis connection details.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">2.2 Quick log verification</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;">docker compose logs n8n | grep "Queue mode"
docker compose logs n8n-worker | grep "Queue mode"</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">You should see lines such as:</p>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;">[2026-01-02 12:34:56] INFO Queue mode enabled – using Redis at redis:6379</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">If the worker log lacks this line, the <code>EXECUTIONS_PROCESS=queue</code> variable is missing or overridden. If you encounter any <a href="/n8n-queue-mode-kubernetes-deployment-errors">n8n queue mode kubernetes deployment errors </a>resolve them before continuing with the setup.</p>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">3. Service Dependency & Healthcheck Best Practices</h2>
<p style="margin-bottom: 2em; line-height: 1.9;">Docker Compose may start n8n before Redis is ready, causing a transient fallback to process mode.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">3.1 Proper <code>depends_on</code> with healthcheck</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;">depends_on:
redis:
condition: service_healthy</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">*Compose now waits until the Redis healthcheck (`PING` → **PONG**) succeeds.*</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">3.2 Common failure patterns</h3>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Symptom</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Root cause</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Fix</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Connection refused on start‑up</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Redis not ready</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Add healthcheck + <code>depends_on</code>.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Service redis failed to start</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Host‑volume permission error</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Ensure the host directory is <code>chmod 700</code> and owned by UID 1000 (node).</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Redis out of memory</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">No <code>maxmemory</code> limit, large payloads</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Add <code>command: ["redis-server", "--maxmemory", "256mb", "--maxmemory-policy", "allkeys-lru"]</code>.</td>
</tr>
</tbody>
</table>
<blockquote style="margin: 0 0 2em 0; padding: 15px; background: #f9f9f9; border-left: 4px solid #ccc;">
<p style="margin: 0; line-height: 1.9;"><strong>EEFA warning</strong> – Using <code>restart: always</code> without healthchecks can create a restart loop where n8n repeatedly attempts to connect to a dead Redis. Prefer <code>restart: unless-stopped</code> combined with healthchecks.</p>
</blockquote>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">4. Connecting to an External Redis Instance</h2>
<p style="margin-bottom: 2em; line-height: 1.9;">When Redis runs outside the Compose network (e.g., managed AWS ElastiCache), you must expose the endpoint correctly.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">4.1 External Redis configuration snippet</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;">services:
n8n:
...
environment:
- REDIS_HOST=redis-prod.mycompany.com
- REDIS_PORT=6379
- REDIS_PASSWORD=superSecret
extra_hosts:
- "redis-prod.mycompany.com:10.0.5.12"</pre>
<p style="margin-bottom: 2em; line-height: 1.9;"><code>extra_hosts</code> provides a static IP mapping for DNS‑less environments.*</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">4.2 Connectivity debugging</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;">docker compose exec n8n nslookup redis-prod.mycompany.com
docker compose exec n8n bash -c "echo > /dev/tcp/redis-prod.mycompany.com/6379"</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">If DNS resolution fails, add the host entry to <code>extra_hosts</code> or attach the services to a custom network that has proper DNS resolution. Avoid <code>network_mode: host</code> in production.</p>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">5. Resource Limits & Queue Back‑Pressure</h2>
<p style="margin-bottom: 2em; line-height: 1.9;">High‑throughput queues can exhaust CPU or memory, leaving executions stuck in <strong>pending</strong>.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">5.1 Recommended limits – UI container</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;"> n8n:
deploy:
resources:
limits:
cpus: "2"
memory: "2G"</pre>
<h3 style="margin-bottom: 45px; line-height: 1.3;">5.2 Recommended limits – Worker container</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;"> n8n-worker:
deploy:
resources:
limits:
cpus: "2"
memory: "2G"</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">Both containers receive the same CPU and memory caps to avoid bottlenecks.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">5.3 Monitoring checklist</h3>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Metric</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Tool</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Threshold</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Redis <code>connected_clients</code></td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">redis-cli info clients</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">≤ 1000</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">n8n‑worker CPU usage</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">docker stats n8n-worker</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">≤ 80 %</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">n8n‑worker memory RSS</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">docker stats n8n-worker</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">≤ 1.8 GB (90 % of limit)</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Queue length (<code>n8n_queue</code>)</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">redis-cli LLEN n8n_queue</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">< 5000 (adjust per workload)</td>
</tr>
</tbody>
</table>
<p style="margin-bottom: 2em; line-height: 1.9;">If thresholds are exceeded, increase the limits or scale out additional workers (see the child page Scaling n8n Queue Mode with Docker‑Swarm).</p>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">6. Advanced Debugging: Capture Full Redis Traffic</h2>
<p style="margin-bottom: 2em; line-height: 1.9;">When logs are inconclusive, capture the Redis protocol exchange.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">6.1 Enable verbose Redis logging (development only)</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;"> command: ["redis-server", "--appendonly", "yes", "--loglevel", "debug"]</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">Debug logging is I/O‑heavy; disable it in production.</p>
<h3 style="margin-bottom: 45px; line-height: 1.3;">6.2 Record traffic with <code>tcpdump</code> inside the n8n container</h3>
<pre style="background: #fafafa; padding: 20px; border: 1px solid #e0e0e0; overflow: auto; line-height: 1.9;">docker compose exec n8n apt-get update && apt-get install -y tcpdump
docker compose exec n8n tcpdump -i any -nn -s 0 -w /tmp/redis.pcap port 6379</pre>
<p style="margin-bottom: 2em; line-height: 1.9;">Open <code>redis.pcap</code> in Wireshark and filter for <code>redis</code> to spot AUTH failures or malformed commands.</p>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">7. Common Pitfalls & Preventive Actions</h2>
<table style="border-collapse: collapse; width: 100%; margin-bottom: 2em;">
<thead>
<tr>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Pitfall</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Why it breaks queue mode</th>
<th style="padding: 13px; border: 1px solid #e0e0e0; text-align: left;">Preventive action</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Missing <code>EXECUTIONS_PROCESS=queue</code> on <strong>one</strong> container</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Worker never picks jobs</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Store env vars in a shared <code>.env</code> and reference it via <code>env_file: .env</code> for both services.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Running n8n with <code>--prisma</code> while Redis mis‑configured</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Prisma falls back to SQLite, bypassing queue</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Remove <code>--prisma</code> unless you need a dedicated DB; queue mode does not depend on Prisma.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Host volume mounted with wrong UID/GID</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">n8n cannot write queue state, causing silent errors</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Ensure the volume owner matches node UID 1000: <code>docker compose run --rm n8n chown -R 1000:1000 /home/node/.n8n</code>.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Using <code>network_mode: host</code> on macOS</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Host DNS is bypassed, breaking <code>REDIS_HOST</code> resolution</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Stick to bridge networking; add static entries via <code>extra_hosts</code> if needed.</td>
</tr>
<tr>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Redis persistence disabled & container restarts</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Queue data lost → jobs disappear mid‑execution</td>
<td style="padding: 13px; border: 1px solid #e0e0e0;">Enable AOF (<code>--appendonly yes</code>) or mount a persistent volume at <code>/data</code>.</td>
</tr>
</tbody>
</table>
<div style="margin: 55px 0;">
<hr />
</div>
<h2 style="margin-bottom: 45px; line-height: 1.3;">Recap</h2>
<ol style="margin-bottom: 1.8em; line-height: 1.9;">
<li>Add <code>EXECUTIONS_PROCESS=queue</code> <strong>and</strong> matching Redis vars to <strong>both</strong> <code>n8n</code> and <code>n8n‑worker</code>.</li>
<li>Ensure Redis is healthy (<code>depends_on</code> + healthcheck).</li>
<li>Verify connectivity (<code>docker compose exec n8n redis-cli ping</code>).</li>
<li>Confirm both containers share the same <code>REDIS_HOST</code>/<code>REDIS_PORT</code>.</li>
<li>Raise CPU/memory limits if jobs stay “pending”.</li>
</ol>
<p style="margin-bottom: 2em; line-height: 1.9;">Apply these steps in order; the first that resolves the log error will bring queue mode back online.</p>
Step by Step Guide to solve n8n queue mode docker compose issues
Who this is for: Developers and DevOps engineers deploying n8n with Docker‑Compose who need reliable queue mode operation. We cover this in detail in the n8n Queue Mode Errors Guide.
Quick Diagnosis
#
Symptom
Immediate Fix
1
Error: Could not connect to Redis
Verify REDIS_HOST, REDIS_PORT, REDIS_PASSWORD; ensure the Redis container is healthy.
2
Queue mode disabled – missing “queueMode” flag
Add -e EXECUTIONS_PROCESS=queue (or -e QUEUE_MODE=1 for legacy images) to both n8n and n8n‑worker.
3
docker compose up exits with “service … failed to start”
Add a healthcheck for Redis and use depends_on with condition: service_healthy.
4
Jobs stay pending
Confirm the n8n‑worker container runs with the same queue env vars as the UI container.
Queue mode stores execution payloads in a single Redis instance (or cluster). If n8n cannot reach Redis it silently falls back to the default “process” mode.
1.1 Essential environment variables
Variable
Recommended value
Description
EXECUTIONS_PROCESS
queue
Switches n8n from the default main process to queue mode.
REDIS_HOST
redis (service name)
Must match the Redis service name in the same compose file.
REDIS_PORT
6379
Default Redis port; change only if you expose a non‑standard port.
REDIS_PASSWORD
(optional)
Set when the Redis container uses requirepass.
REDIS_TLS
true/false
Enable for TLS‑enabled Redis.
EEFA note – In production always set REDIS_PASSWORD and enable TLS (REDIS_TLS=true). Missing these can cause silent connection failures that are hard to debug.
1.2 Minimal working Docker‑Compose – Redis service
[2026-01-02 12:34:56] INFO Queue mode enabled – using Redis at redis:6379
If the worker log lacks this line, the EXECUTIONS_PROCESS=queue variable is missing or overridden. If you encounter any n8n queue mode kubernetes deployment errors resolve them before continuing with the setup.
3. Service Dependency & Healthcheck Best Practices
Docker Compose may start n8n before Redis is ready, causing a transient fallback to process mode.
3.1 Proper depends_on with healthcheck
depends_on:
redis:
condition: service_healthy
*Compose now waits until the Redis healthcheck (`PING` → **PONG**) succeeds.*
3.2 Common failure patterns
Symptom
Root cause
Fix
Connection refused on start‑up
Redis not ready
Add healthcheck + depends_on.
Service redis failed to start
Host‑volume permission error
Ensure the host directory is chmod 700 and owned by UID 1000 (node).
EEFA warning – Using restart: always without healthchecks can create a restart loop where n8n repeatedly attempts to connect to a dead Redis. Prefer restart: unless-stopped combined with healthchecks.
4. Connecting to an External Redis Instance
When Redis runs outside the Compose network (e.g., managed AWS ElastiCache), you must expose the endpoint correctly.
If DNS resolution fails, add the host entry to extra_hosts or attach the services to a custom network that has proper DNS resolution. Avoid network_mode: host in production.
5. Resource Limits & Queue Back‑Pressure
High‑throughput queues can exhaust CPU or memory, leaving executions stuck in pending.