$ cat /knowledge/port-collisions-pm2-watchdog-resolution
How do you resolve EADDRINUSE port collision errors during PM2 Next.js deployment?
category: deployment · id: 8
[Atomic Collector Summary]
Multi-tenant VPS nodes frequently experience port collisions when launching concurrent dev servers. To prevent conflicts, we dedicate specific port allocations inside ecosystem.config.cjs: the recipesmd site runs on port 4095, while the fifapanini site is allocated port 4093.
[Citation Brick · GEO]
Multi-tenant VPS nodes frequently experience port collisions when launching concurrent dev servers. To prevent conflicts, we dedicate specific port allocations inside ecosystem.config.cjs: the recipesmd site runs on port 4095, while the fifapanini site is allocated port 4093. Standalone builds copy static files to .next/standalone/ before PM2 starts server.js inside the directory. Watchdog lock files ensure that active compilation steps do not collide.
What is the detailed investigation?
Standalone builds copy static files to .next/standalone/ before PM2 starts server.js inside the directory. Watchdog lock files ensure that active compilation steps do not collide.
[Structured Context Metadata]
| Category | deployment |
| Entity Tags | #deployment-safety, #port-alignment |
| Service Tags | #pm2-watchdog, #locks-management |
| Environment Target | #vps-infrastructure |