I think I’ve managed to bodge a fix for now.
For those interested in this kind of geekery, the database has a “buffer pool” which grabs memory and holds onto it just in case it needs it.
This was causing the Linux kernel to shit itself because it thinks the system is critically low on memory. In this situation the kernel uses a “process killer” to go and free up memory pages, so it was shutting down the database.
The solution/bodge was to create a swap file on disk that the system can page out to if necessary, so basically it thinks it’s got more RAM available then it’s actually got.
Seems to be working for now, so you cunts don’t have to put your hand in your pockets 🤓