Commit 5e7a2de
Fix PM2 cluster mode ECONNREFUSED errors
Node.js 17+ changed DNS resolution to prefer IPv6 over IPv4. When running
in PM2 cluster mode, this causes "ECONNREFUSED ::1:8080" errors if the
backend only listens on IPv4 (127.0.0.1).
This fix sets dns.setDefaultResultOrder('ipv4first') at the very start
of the SSR bootstrap to ensure localhost resolves to IPv4.
See: nodejs/node#40537
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c2258bf commit 5e7a2de
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | 11 | | |
3 | 12 | | |
| |||
0 commit comments