Let it crash!
summary
Crashes are treated as facts: uncaughtException and unhandledRejection cause immediate exits, so the app logs full error objects and stack traces, generates post‑mortems and restarts cleanly. The code uses server.close with a nonref timeout to finish or cut lingering sockets, runs multiple worker processes behind a load balancer, and relies on OS/container restarters rather than in‑process magic. process.abort generates core dumps and helps native debugging with llnode, log stack and reason with Pino or Winston to external stores, use systemd/upstart or container restart policies.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:05Some background
- 3:22Health Checks
- 4:16APM
- 5:23Let it crash!
- 6:12Process Lifecycle
- 8:53Exit Events
- 11:53Signal Events • SIGTERM: A process monitor will send a SIGTERM signal to successfully terminate a process
- 13:08Error Events
- 17:13Running more than one process
- 18:32Process Monitoring Use OS native process monitoring to restart your process on failure
- 24:08Logging
- 28:07Resources








