Okay, I'm a bit stumped. I have a small-ish ubuntu VM with the LAMP stack. Sometimes MySQL just goes away. No information why - not in the MySQL logs, not in syslog, nowhere. It just shuts down. It doesn't seem to be memory either, I've once had htop running while it happened and the machine was basically idle with more than half of the memory empty.
The most infuriating thing is: I had this on another VM before, I fixed it and I didn't write down how. Ugh.
@dominik IIRC it's a timeout setting, it does it if you let too much time pass between interactions (queries) with the database.
If you want a quick fix, we built this wrapper for DBAL for this specific purpose
@alessandrolai yeah, I've seen this one before, but it's not actually that problem - the whole MySQL process just stops.
- Unattended upgrades
- OOM Killer (e.g. VM memory ballooning)
- AppArmor
- A scheduled backup process (e.g. mysqldump)
- If the database is the backend for a public facing site then a remote exploit
...could be possible causes.