Decodificador de Errores n8n, OpenClaw y Docker (Soluciones Copiar y Pegar)
Buscador instantáneo para Exit 137 OOM, SQLITE_BUSY, 502 Bad Gateway, N8N_SECURE_COOKIE, ENOSPC y fallos TLS de Caddy.
Critical Exit Code 137 (SIGKILL / OOMKilled) Memory & OOM
container exited with code 137 | dmesg: Out of memory: Killed process (node)
Root cause: Linux kernel OOM killer terminated n8n or OpenClaw because container RSS exceeded host RAM with no swap cushion.
sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
# Add to docker-compose.yml environment:
# NODE_OPTIONS=--max-old-space-size=2048
Prevention: Use at least 4 GB RAM ($47.98/yr RackNerd BF) or 8 GB RAM (Hostinger KVM 2) + 2 GB swap. · Full Fix Guide → · Recommended Node →
High SQLITE_BUSY: database is locked Database
QueryFailedError: SQLITE_BUSY: database is locked | n8n webhook timeout
Root cause: Default SQLite database cannot handle concurrent writes when multiple webhooks or AI agent sub-workflows fire simultaneously.
# Switch .env to PostgreSQL 16 (only 31 MB idle RSS):
DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=postgres
DB_POSTGRESDB_DATABASE=n8n
DB_POSTGRESDB_USER=n8n
Prevention: Always deploy n8n with PostgreSQL 16 from day one using NodeBudget Blueprint Generator. · Full Fix Guide → · Recommended Node →
High Your n8n server is configured to use a secure cookie HTTPS & Caddy
Your n8n server is configured to use a secure cookie, however you are either visiting via plain HTTP
Root cause: N8N_SECURE_COOKIE=true is active while accessing n8n via raw http://IP:5678 instead of an HTTPS reverse proxy.
# Put Caddy 2.8 in front on port 443 and set .env:
WEBHOOK_URL=https://n8n.yourdomain.com/
N8N_HOST=n8n.yourdomain.com
N8N_PROTOCOL=https
N8N_SECURE_COOKIE=true
Prevention: Never disable N8N_SECURE_COOKIE in production; let Caddy auto-provision TLS. · Full Fix Guide → · Recommended Node →
High HTTP 502 Bad Gateway (Caddy / Nginx → n8n) HTTPS & Caddy
502 Bad Gateway | dial tcp: lookup n8n: no such host | connection refused
Root cause: Reverse proxy is pointing to 127.0.0.1:5678 inside another container, or n8n crashed in a restart loop.
docker compose ps && docker compose logs --tail=50 n8n
# In Caddyfile, proxy to Docker service name (NOT localhost):
# reverse_proxy n8n:5678
Prevention: Keep Caddy and n8n on the same Docker Compose bridge network. · Full Fix Guide → · Recommended Node →
Critical ENOSPC: no space left on device Storage & Logs
ENOSPC: no space left on device | PostgreSQL panic: could not write to WAL
Root cause: Unpruned n8n execution JSON payloads, binary files, or unbounded Docker json-file logs filled the VPS root disk.
df -h / && docker system prune -af --volumes
# Add to n8n .env to cap retention at 7 days:
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=168
Prevention: Enable pruning + Docker log max-size: 10m; for local AI models upgrade to 2TB NVMe. · Full Fix Guide → · Recommended Node →
Medium OAuth 400: redirect_uri_mismatch (Google / Slack) HTTPS & Caddy
Error 400: redirect_uri_mismatch | callback URL shows http://localhost:5678
Root cause: n8n generated an internal localhost callback URL because WEBHOOK_URL was missing or lacked https://.
# Set exact public HTTPS domain in .env and restart:
WEBHOOK_URL=https://n8n.yourdomain.com/
N8N_EDITOR_BASE_URL=https://n8n.yourdomain.com/
docker compose up -d --force-recreate n8n
Prevention: Verify the OAuth Redirect URL shown in n8n Credentials starts with https:// before registering in Google Cloud Console. · Full Fix Guide → · Recommended Node →
Medium Caddy ACME HTTP-01 TLS Certificate Failure HTTPS & Caddy
obtaining certificate: HTTP 400 urn:ietf:params:acme:error:unauthorized
Root cause: Port 80 is blocked by UFW/firewall, occupied by Apache/Nginx, or Cloudflare orange-cloud proxy conflicts with HTTP-01 challenge.
sudo ss -tulpn | grep -E ':80|:443'
sudo ufw allow 80/tcp && sudo ufw allow 443/tcp
# If behind Cloudflare, set SSL/TLS mode to Full (Strict) or use DNS-01 / cloudflared.
Prevention: Check port 80 listeners before launching Caddy on a fresh VPS. · Full Fix Guide → · Recommended Node →
Medium EACCES: permission denied, open /home/node/.n8n/config Docker & Linux
Error: EACCES: permission denied, mkdir /home/node/.n8n
Root cause: Host bind-mount directory is owned by root:root instead of UID 1000 (the node user inside official n8n image).
sudo chown -R 1000:1000 ./n8n_data
docker compose restart n8n
Prevention: Prefer Docker named volumes (n8n_data:/home/node/.n8n) to avoid host UID drift. · Full Fix Guide → · Recommended Node →
Medium Playwright / Chromium Tab Crash (Page crashed / /dev/shm) Memory & OOM
Target closed | Page crashed | Failed to open /dev/shm
Root cause: Docker defaults /dev/shm to 64 MB, causing headless Chromium used by OpenClaw or scrapers to crash immediately.
# Add under your OpenClaw / browser service in docker-compose.yml:
shm_size: '1gb'
init: true
Prevention: Provision 8 GB RAM VPS (Hostinger KVM 2) or 16 GB Beelink N100 for browser-heavy AI agents. · Full Fix Guide → · Recommended Node →