Self-hosted n8n on a 2GB VPS falls over when three workflows run at once. Queue mode or just more RAM?
Summary
An agency runs n8n in Docker with Postgres on a 2 vCPU, 2GB VPS for about 40 client workflows; when three heavy ones fire together, executions hang and the kernel kills the node process. They ask whether queue mode with Redis and a worker is warranted or more RAM is the answer.
What the comments say
Queue mode keeps the editor alive by moving executions to a worker, but on 4GB the main process, one worker, Postgres and Redis already coexist; a browser node alone can take 300-400MB per execution, so three scraping runs exceed 2GB before swap helps. Cap worker concurrency at 2 with N8N_CONCURRENCY_PRODUCTION_LIMIT and stagger scraping schedules by ten minutes.
N8N_CONCURRENCY_PRODUCTION_LIMIT also works in regular mode without Redis or a worker, so it can go on the current 2GB box today: set it to 2 and the third heavy run waits in a first-in, first-out queue instead of loading into memory. It is off by default and only counts webhook and trigger runs, so manual and sub-workflow runs are not limited.
Queue mode on the same 2GB box adds Redis and worker process overhead, so it makes memory pressure worse, not better; it only pays off once the worker runs on its own machine. Upgrading to 4-8GB fixes the client-facing problem in minutes and is cheaper than missed webhooks.
Moving the scraping workflows off the n8n box, to a second cheap VPS or a scraping API that posts results back via webhook, stops the webhooks from dying immediately; execution pruning (EXECUTIONS_DATA_PRUNE plus EXECUTIONS_DATA_MAX_AGE) and N8N_DEFAULT_BINARY_DATA_MODE=filesystem keep Postgres bloat from quietly eating memory.
Setting NODE_OPTIONS=--max-old-space-size=1024 on the n8n container turns a kernel OOM kill into a single failed execution that can be retried, keeping the editor and in-flight webhooks alive; set it slightly under any Docker memory limit since Node does not see the container limit on its own.
Webhook nodes set to respond immediately instead of waiting for the workflow to finish return a 200 to the sender even when the box is slow, and not saving successful executions keeps Postgres from bloating on a small instance.
Join the discussion
Was this useful to you?
Related
Claude Code is insane. My entire self-hosted Netflix is 17 MB.
r/ClaudeAI · CoderLuii
I made $17k from my SaaS: the services I used free or cheap
r/SaaS · Chemical-Bed70
Is voice AI actually worth the cost for small businesses?
r/n8n · Ipushedhumptydumptyy
You Don't Need 33 AI Agents to Run a Small Business
kimdoyal.substack.com · Kim Doyal
What's the one line you now add to almost every prompt?
r/PromptEngineering · Playful_Net_8756