ReleaseRun · Node.js 2026
5 Node.js Mistakes You're Probably Making in Production
Each one is easy to miss and expensive to debug at 2am.
Tap to start →
1
Mistake 1 / 5
Running an EOL Node.js version
Node.js 18 hit end-of-life in April 2025. No more security patches. CVEs get discovered, nothing gets fixed. Many teams still haven't upgraded.
node --version # v18.x = EOL since Apr 2025 # Current LTS: Node.js 22 (until Apr 2027) # Current: Node.js 24 (released May 2025)
⚠ Check your .nvmrc and base image tags
✓ Upgrade to Node.js 22 LTS today
2
Mistake 2 / 5
Blocking the event loop
JSON.parse() on a 10MB payload, synchronous fs calls, heavy regex — these freeze every request until they finish. Under load, this causes cascading timeouts.
// Slow: blocks event loop const data = fs.readFileSync('big-file.json'); // Fast: async, non-blocking const data = await fs.promises.readFile('big-file.json');
✓ Use async/await for all I/O
3
Mistake 3 / 5
No memory limits in containers
Node.js defaults to ~1.5GB heap. In a container with a 512MB limit, it'll get OOM-killed before V8's GC even tries to free memory. The fix is one flag.
node --max-old-space-size=400 server.js # Or in package.json: "start": "node --max-old-space-size=400 server.js"
✓ Set heap size ~80% of container limit
4
Mistake 4 / 5
Swallowing unhandled rejections
Since Node.js 15, unhandled promise rejections crash the process (exit code 1). Older apps that relied on the silent swallow behavior break in production silently.
process.on('unhandledRejection', (err) => { console.error('Unhandled rejection:', err); process.exit(1); // crash fast, don't limp }); process.on('uncaughtException', (err) => { console.error('Uncaught exception:', err); process.exit(1); });
✓ Handle all rejections explicitly
5
Mistake 5 / 5
Missing graceful shutdown
When Kubernetes sends SIGTERM to roll out a new version, processes without a handler get killed mid-request. Users see 502s during every deploy.
process.on('SIGTERM', () => { server.close(() => { db.disconnect(); process.exit(0); }); // Force exit after 10s setTimeout(() => process.exit(1), 10_000); });
✓ Always handle SIGTERM before shutdown
Know your Node.js version health
Free badges that show your Node.js version's EOL status. Auto-updates when a version goes end-of-life. Works in any README.
Free Node.js Badges →
Node.js Reference Guide