RaspberryPi 3 abnormal crashes

I have a Raspberry 3 with Nextcloud server that works well, but when there is a lot of load (but not always, I do not understand in what conditions) crashes, is no longer reachable on the network and does not transmit or receive more data of any kind, it’s just offline.
I tried to visualize nextcloud.log but I think there’s anything strange, what I’ve missed?
It often happens on a strong exchange of data and the only way to put the Raspberry online is to disconnect the power, at which point it starts normally. I also realized that if it falls repetitively and I close the client that is synchronizing, it remains online! But I can not find problems from the log.
At this point the only solution is to buy a wifi socket (power strip? I don’t know what’s the English correct word) that allows me to turn off and on the connected device if I’m not at home when it happens, but it is not the ultimate solution because Raspi can work for days in a row and then maybe hang three times in a day.
Can anyone try to help? Thanks.

“Crashing” under load isn’t unheard of, ultimately if you’re doing heavy data transfer the Pi is going to quickly run out of resources to keep up. I’ve seen users report that just leaving it to catch up (however long that takes…) can work.

If you’re doing a big initial transfer, seeding the data could help, otherwise I think you’re basically hitting the limits of the hardware.

But I could be wrong :slight_smile:

@didi
Whatever causes the crash, I strongly recommend to solve it by the root instead of buying some remote reboot device. Especially with Nextcloud/database running, you will easily face database/file system corruption, thus data loss finally.

There are several possible reasons of course:

  • On my RPi2 I had NC without swapfile and during backup with some other random sync/access tasks, my memory consumption raised from ~50% on idle to 100%, leading to randomly killed processes that e.g. also broke SSH, webserver or something else. So have a look at your memory consumption while do some heavy file upload or something, maybe see other cron jobs that might interfer. Then assur that your swapfile size coveres that maximum of possible memory consumption or remove/time some of the task to reduce peak.
  • Simply broken hardware (if everything else could be excluded) might of course also be. Generally there need to be some hint’s in the /var/log/kernel.log with rsyslog installed or within journalctl -r -p err with -u kernel or -t kernel added as option in case.

Can’t say about the RBPI3, but with my old Odroid-X2 I often had similar crashes due to insufficient power-supply under high load. Maybe testing one with a higher Amp rating would be worth a try?

1 Like

After days and days of testing, I think the problem was given by filenames with accents and apostrophes. In a 35 Gb folder with 92 files (which has always crashed everything) the problem after renaming does not show up on windows clients anymore. I hope I can help you to solve the problem definitively :slight_smile:

1 Like

I experienced random crashes due to file system corruption with Nexcloud/OwnCloud on RPi2 and RPi3 until I moved the root OS to a USB flash drive instead of the MicroSD.

After that I increased mu swap file to 2GB and set up monit to monitor and restart sshd, nginx, mysql, reddis and php-fpm services on failure.

2 Likes

Wow!! Thanks moretocome, I didn’t know monit, it’s wonderful!