"The server crashed" can mean three different things: the whole machine went down, the app on it stopped, or the database stopped. Work out which first: can you log in? Is the app process running? Then read the logs from the minutes before the crash. The usual causes are running out of memory, running out of disk, or a code or config change that makes the app fail on startup.
What's the problem
The site went down suddenly. Maybe it came back after a restart, maybe it keeps happening.
Why it happens
- Out of memory: Linux killed the app or database. See out of memory.
- Disk full: services can't write and stop. See disk full.
- An unhandled error in the app that kills the process, often from a recent deploy.
- The app isn't set to restart automatically, so one crash means it stays down.
- A system update or reboot after which services didn't start.
- The hosting provider had a hardware or network problem.
How to fix it
- Get the site back: restart the app (or the server) from your dashboard.
- Work out what crashed: the machine (check uptime), the app (check its process), or the database.
- Read the logs from just before the crash: your app's logs,
journalctlfor system services, and the system log for out-of-memory kills. - Look at what changed: deploys, updates, config edits.
- Make the app restart on its own (systemd, PM2, Docker restart policies), so one crash doesn't mean hours of downtime.
- Fix the root cause you found in the logs.
What Preventionlabs checks
One click runs the full report on your domain. For this problem it shows whether your site loads, how fast, and where its redirects go; uptime checked every 5 minutes, with an email when the site goes down and when it is back. With Cloudflare connected, it also shows which pages returned server errors (5xx) to visitors, and when; recent deploys and account changes, with their times. It can't log in to your server, so memory, disk and process problems show up in your host's dashboard and logs.
Run your free reportYour first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.
Sources
- systemd (man7.org): journalctl(1)manual page
journalctl is used to print the log entries stored in the journal by systemd-journald.service(8) and systemd-journal-remote.service(8) .
- The Linux Kernel documentation: Documentation for /proc/sys/vm/official docs
If this is set to zero, the OOM killer will scan through the entire tasklist and select a task based on heuristics to kill. This normally selects a rogue memory-hogging task that frees up a large amount of memory when killed.