AI agents & automation
Common n8n errors on a self-hosted server and how to fix them
Fixes for the n8n problems people hit most on their own servers: out-of-memory crashes, Connection Lost, webhook URLs showing localhost, a full disk and messages that never arrive.

On this page
Running n8n on your own server is reliable once it's set up, but a handful of problems come up again and again. Here's how to recognise and fix each one. The fixes come from n8n's official documentation and assume the Docker Compose setup from our installation guide.
1. "Connection Lost" or the workflow stops mid-way (memory)
What you see: messages such as "Execution stopped at this node (n8n may have run out of memory while executing it)", "Connection Lost" or "503 Service Temporarily Unavailable". In the server logs: "Allocation failed - JavaScript heap out of memory".
Why: a workflow is handling more data than the memory allows. n8n's docs list the usual causes: large JSON or binary data, many nodes, Code nodes, manual executions and several workflows running at once. With Docker, n8n restarts itself, so it can look like a random disconnect.
Fix:
- Process data in smaller chunks: use the Loop Over Items node and move heavy parts into a sub-workflow with Execute Workflow.
- Avoid the Code node for large datasets where a built-in node can do the job.
- Don't test huge datasets with manual runs in the editor.
- Give Node.js more memory through an environment variable, then recreate the container:
environment:
- NODE_OPTIONS=--max-old-space-size=2048
Set the value (in MB) below your server's free RAM, and check usage with docker stats. If memory is simply too small, move to a plan with more RAM.
2. Webhook URLs show localhost:5678
Why: n8n doesn't know its public address.
Fix: set the public URL and recreate the container:
environment:
- N8N_WEBHOOK_URL=https://n8n.example.com/
On n8n versions before 2.30 the variable is WEBHOOK_URL. Also set N8N_PROXY_HOPS=1 when n8n sits behind one reverse proxy such as Traefik or Nginx.
3. Pages break when n8n runs under a path
What you see: n8n served at example.com/n8n with a reverse proxy, and some screens or folders don't load.
Fix: n8n's docs warn that combining N8N_PATH with a reverse proxy can cause navigation problems. Use a subdomain such as n8n.example.com instead.
4. The disk keeps filling up
Why: execution history is stored in the database.
Fix: n8n prunes old executions by default (EXECUTIONS_DATA_PRUNE=true), keeping data for 336 hours (14 days) and at most 10,000 executions. If your disk is small or your workflows run very often, lower these limits:
environment:
- EXECUTIONS_DATA_MAX_AGE=168
- EXECUTIONS_DATA_PRUNE_MAX_COUNT=5000
You can also stop saving successful runs of busy workflows with EXECUTIONS_DATA_SAVE_ON_SUCCESS=none, keeping only errors.
5. Scheduled workflows run at the wrong time
Fix: set your timezone, as in n8n's Docker Compose example:
environment:
- GENERIC_TIMEZONE=Asia/Riyadh
- TZ=Asia/Riyadh
6. You can't log in over http://
Why: n8n uses secure cookies, which browsers only send over HTTPS.
Fix: always open n8n through its https:// address. If you haven't set up HTTPS yet, follow the Traefik setup in our installation guide rather than turning the protection off.
7. WhatsApp messages never reach n8n
Why: according to n8n's docs, Meta only sends messages to apps subscribed to your WhatsApp Business Account, and n8n doesn't subscribe it for you. No error appears.
Fix: subscribe the app to the account through Meta's Graph API, as explained in our WhatsApp agent guide.
When to switch to PostgreSQL
Self-hosted n8n uses SQLite by default, which is fine for small setups. If you run many workflows or plan to use queue mode for scaling, move to PostgreSQL (n8n supports versions 16 to 18 as of 2026) using the DB_TYPE=postgresdb settings in n8n's database docs.
Sources & references
Related reading
AI agents & automation
How to install n8n on a VPS with Docker and free SSL
Self-host n8n on your own VPS with Docker Compose, a free Let's Encrypt certificate and correct webhook URLs. Tested setup, real RAM numbers and backups.
4 min read
AI agents & automation
Best VPS for n8n and AI agents: how much server you actually need
How much RAM and CPU n8n, OpenClaw, Hermes Agent and Ollama really need, which VPS plan size fits each, and what to check before you pick a provider.
2 min read
AI agents & automation
Hostinger VPS review for n8n and AI agents: our hands-on experience
We run this site on a Hostinger KVM 2 VPS next to other Docker projects. What the plans include, the n8n and Docker templates, what support covers, and who it suits.
2 min read