Engineering Dispatches
Auditing PM2 Persistence on Production Droplets
Auditing PM2 Persistence on Production Droplets
Silent crash loops rarely announce themselves. They show up as enabled-but-dead systemd units, duplicate port listeners, and restart counters that climb while dashboards still look green.
Symptoms we watch for
| Signal | Likely cause |
|---|---|
↺ restart count climbing |
App crash loop or deploy race |
| Two PM2 homes active | Root + user collision |
| Port listener owned by stale PID | Orphaned god daemon |
Zero-trust boot checklist
- Disable dead user units (
pm2-<user>.service) when root owns production. - Run
pm2 startup systemd -u root --hp /root. pm2 saveafter the fleet is verified online.
systemctl disable pm2-polycracker.service
pm2 startup systemd -u root --hp /root
pm2 save
systemctl is-enabled pm2-root.serviceCollision testing
Cross-reference listeners before every deploy:
ss -tulpn | grep ':3000'
pm2 listIf more than one process claims the application port, stop the stale fleet before restarting nginx upstream blocks.
Studio takeaway
Production auditing is not about deleting services aggressively—it is about making one authoritative boot path and documenting which user owns the runtime.
For architecture engagements, contact the studio at [email protected].