Deploy and run your backend with confidence
Practical guides on deploying and running a backend in production, plus plain-English fixes for the errors you hit along the way — real causes, copy-paste commands, and how to stop them recurring.
Prefer to paste your error and get an instant fix? Try the interactive Deploy Error Decoder →
Backend guides
Broader, practical guides on deploying and running a backend in production — each links down to the specific errors below.
Deploy a backend without Kubernetes
You don't need Kubernetes. The five pieces that actually keep a backend running in production.
Read the fixZero-downtime deployment strategies
Blue-green, canary, rolling — how each works, when to use it, and what keeps a deploy from dropping requests.
Read the fixDeploy without dropping requests
Every deploy stops your old process. Draining, SIGTERM handling, and readiness flips keep requests alive.
Read the fixReadiness vs liveness health checks
One gates traffic, one restarts a hung process. Confusing them causes downtime and crash loops.
Read the fixReverse proxy in front of your app
TLS, routing, buffering, and limits in front of your app. A minimal nginx config and the settings that matter.
Read the fixSelf-hosted vs cloud hosting
The real tradeoffs in cost, control, compliance, and effort — and when running your own servers makes sense.
Read the fixDeploy Error Decoder
Paste your error into Google and you land here. Real causes, copy-paste commands, and how to stop each one from recurring.
EADDRINUSE: address already in use
Another process is already on your port. Find it, free it, and stop it recurring on every deploy.
Read the fix502 Bad Gateway after deploy
Your proxy can't reach the app. Diagnose the crash, port, or readiness race — and gate it for good.
Read the fixCrashLoopBackOff
Why a container restarts forever, how to read the exit code, and how to break the loop.
Read the fixSIGTERM & graceful shutdown
What SIGTERM means, why requests get dropped on deploy, and how to drain cleanly before exit.
Read the fixECONNREFUSED: connection refused
Your app reached the host but nothing was listening. Down service, wrong host/port, or Docker networking.
Read the fixCannot find module (MODULE_NOT_FOUND)
Works locally, fails in prod. Missing deps, a devDependency at runtime, or case-sensitive paths on Linux.
Read the fixECONNRESET / socket hang up
The other side dropped the TCP connection mid-request. Idle keep-alive, an upstream restart, or a proxy timeout.
Read the fixExit code 137 (OOMKilled)
Your container hit its memory limit and was killed. Confirm OOM, find the ceiling, and fix the leak or raise it.
Read the fixJavaScript heap out of memory
Node hit its V8 heap ceiling. Raise it for big builds, or find the leak if it grows forever.
Read the fixPermission denied (publickey)
The server rejected your SSH key. Check it's loaded, added to the host, and matched to the right account.
Read the fix413 Request Entity Too Large
The request body hit a size limit — nginx client_max_body_size or your body parser. Raise both, sanely.
Read the fixBlocked by CORS policy
The browser blocked a cross-origin response. It's a server-side header fix, not a client one.
Read the fix504 Gateway Timeout
The proxy waited for the app and gave up. The app is reachable but too slow — find and fix the slow path.
Read the fixENOSPC: no space left on device
A write failed because something filled up — disk, inodes, or the inotify watch limit. Find it and reclaim.
Read the fixEACCES: permission denied
The OS refused access — a low port, a file you don't own, or broken npm perms. Fix it without chmod 777.
Read the fixnpm ERR! code ELIFECYCLE
Not the real error — an npm script exited non-zero. The actual failure is in the lines above it.
Read the fixEMFILE: too many open files
Your process hit its file-descriptor limit. Raise the ulimit for real load, or fix the descriptor leak.
Read the fixSSL/TLS handshake failed
Client and server couldn't agree on a secure connection. Expired cert, missing chain, wrong host, or protocol.
Read the fixCannot use import statement outside a module
Node parsed your file as CommonJS but it uses ESM import syntax. Pick one module system and commit to it.
Read the fixPostgres: too many clients already
Postgres hit max_connections. The real fix is a connection pooler and sane pool sizes — not just raising the limit.
Read the fixDocker: exec format error
An architecture mismatch — arm64 image on an amd64 host (or vice versa). Build for the target platform.
Read the fixconnect ETIMEDOUT
No answer at all before timing out — usually a firewall/security group, wrong host, or overloaded upstream.
Read the fixHost key verification failed
SSH won't trust the server's key — first connection, rebuilt server, or empty CI known_hosts. Add it safely.
Read the fixSelf signed certificate in chain
Node doesn't trust the cert chain — corporate proxy, private CA, or missing intermediate. Trust the CA, don't disable TLS.
Read the fixPassword authentication was removed
GitHub no longer accepts your password over HTTPS. Use a Personal Access Token, or switch the remote to SSH.
Read the fixgetaddrinfo ENOTFOUND
A hostname didn't resolve. A typo, a missing env var, or a Docker service name used as localhost. Check resolution.
Read the fixStop fixing these by hand
Infraveil is a backend operations control plane you run on your own servers. It supervises your services, gates every deploy behind your approval and a health check, and recovers from failures with a one-click rollback — so most of these errors never reach your users.