Hi, running a Nextcloud Box server on Raspberry Pi3 (not + version).
More and more often it just stops, not reacting to ssh or local console login with keyboard/monitor.
Using REISUB to avoid hardreset by taking away power supply.
Is there any way to learn what is going on?
I’m seeing sometimes on the monitor messages about mysql being out of memory. But why would that take down the sshd also?
The nextcloud.box does not have swap defined, and I’d rather keep it like that.
It’s very common when memory is running low for something to get killed by the Linux “OOM Killer” (where OOM stands for Out Of Memory). Often times the ssh daemon can be taken out. If you login to the box and look in the system log, you may find reference to the OOM killer at work. The solution on a fixed-memory device such as the Raspberry Pi is a combination of reducing memory footprint and optionally adding swap space. Unfortunately adding swap is really only a short term workaround because typically once the memory becomes starved the system might end up swapping endlessly and become unusable anyway, so called swap-death.
So the best answer is to reduce the memory footprint, which will usually mean tuning apache, mysql or whatever other long running processes are installed. This can be quite a task, but once done successfully you should be able to ensure the memory footprint comes in under the amount of RAM you have.