Investigating VM crash

This commit is contained in:
Théophile Gervreau-Mercier
2026-04-13 11:10:32 +02:00
parent 0c29fa21e9
commit 5c5054d744
5 changed files with 966 additions and 0 deletions

55
docs/IMMEDIATE_FIX.md Normal file
View File

@@ -0,0 +1,55 @@
# IMMEDIATE FIX - VM Crash Prevention
## TL;DR
**Root Cause:** Serial console service (`serial-getty@ttyS0`) crashed 421,491 times over 50 days, exhausting memory.
**NOT caused by:** Your posterg website/application (it's innocent!)
## The Fix (5 minutes, zero downtime)
SSH into the server and run:
```bash
ssh theophile@posterg.erg.be -p 3274
# Disable the broken serial console service
sudo systemctl stop serial-getty@ttyS0.service
sudo systemctl disable serial-getty@ttyS0.service
sudo systemctl mask serial-getty@ttyS0.service
# Verify it's masked
sudo systemctl status serial-getty@ttyS0.service
# Should show: "Loaded: masked"
# Check system health
free -h
systemctl --failed
```
## Done!
The VM will no longer crash from this issue. See `VM_Crash_Analysis_FINAL.md` for complete details.
## Bonus: Clean Up the Database Schema Errors
While you're there, fix the post-reboot database issues:
```bash
cd /var/www/posterg
# Check which migrations need to run
ls -la storage/migrations/
# If migrations exist, apply them manually or:
# Review and fix the missing 'tags' table and 'ts.role' column
sqlite3 storage/posterg.db "SELECT name FROM sqlite_master WHERE type='table';"
```
---
**Summary Stats:**
- Serial getty crashes: **1,264,488**
- Restart counter at OOM: **421,491**
- Days until OOM: **~50 days**
- Your application's fault: **0%**