Can I test RaspberryPi 3 memory from Core 16

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.

Many thanks for any insights!

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.

Many thanks indeed, will have a look on logs (non-expert speaking…) So far I found this:

Jan 20 21:10:10 nextcloud kernel: [ 7344.870472] [12520]     0 12520    47987      648      20       0        0             0 php-fpm
Jan 20 21:10:10 nextcloud kernel: [ 7344.870479] Out of memory: Kill process 12490 (php-fpm) score 171 or sacrifice child
Jan 20 21:10:10 nextcloud kernel: [ 7344.870608] Killed process 12490 (php-fpm) total-vm:335792kB, anon-rss:146648kB, file-rss:14972kB
Jan 20 21:10:15 nextcloud kernel: [ 7351.775641] audit_printk_skb: 429 callbacks suppressed

When looking at top (or free) mysql would be typically at around 15% (of the 1GB on the RPi3).

I’ll go and lower the nextcloud memory allowance to 256m. Let’s see.

Thank you :slight_smile:

3 Likes