Files
dwroller/database/pm2.config.js
Alex 768fdfd419 Add PM2 restart_delay and max_restarts to prevent crash-loop spam
When DB_PASSWORD is missing on startup, server exits and PM2 was
restarting every ~660ms flooding backend.log with ER_ACCESS_DENIED_ERROR.
Now waits 5s between restarts and caps at 10 attempts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 18:31:32 +01:00

18 lines
314 B
JavaScript

module.exports = {
apps: [
{
name: 'deathwatch-server',
script: './server.js',
cwd: __dirname,
watch: false,
restart_delay: 5000,
max_restarts: 10,
env: {
NODE_ENV: 'production',
PORT: 5000,
DB_PASSWORD: 'DwRoller@2025!'
}
}
]
};