I’ve got a strange behaviour with my dietpi running on a Pi Zero (with external USB adapter): The sytem crashes randomly after 1-5 days of operation.
In the syslog I can see, that there was a reboot happening but somehow the system does not really come back and I lose my LAN connection.
Do you have any ideas what could be the reason?
I tried to exchange the power supply - this did not solve the problem.
Attached you can find the syslog before the crash.
I saw in this forum, that this happend to other users a well, but I’m not sure, if it was solved:
if the system stops at 10:40 I would call this a crash
The leds were still on, but there was no SSH connection over LAN possible.
This I why I did a reboot today in the morning by removing the power supply.
Full log mode is active. Do you need any specific file?
first i also thought so, but I had a logging tool running and this stopped as well. also you can see in the syslog, that there are no entries anymore. so for me this rather looks like a system stop/crash…
Check also daemon.log and cron.log. It might just double with syslog, not sure currently. Also pinging the Pi doesn’t work anymore after the crash, right?
And please also run vcgencmd get_throttled by times, to check whether there happened any voltage or temperature related CPU throttling. If the output is throttled=0x0, then all is fine, else some throttling happened.
Is the PHP sessions module actually used? ls -l /run/php_sessions
If it has no content, you can disable the service/timer for it: systemctl disable --now phpsessionclean.timer
But I cannot imagine how it would cause a crash .
During the day it did log the 5V supply (via external oscilloscope) and also via vcgencmd get_throttled.
Result: neither voltage dips nor a vcgencmd log entry.
So it looks like the power supply is not the issue
Later today I had another crash. Again the last syslog entry is:
Jun 17 14:55:01 DietPi CRON: (www-data) CMD (php /var/www/nextcloud/cron.php)
Now I tried to uninstall nextcloud.
Could the RAM usage be an issue? As I said: I’m running a PI Zero with little RAM.
Is there any command to log when the system is out of memory?
well you coud use free -m to watch the ram usage. or if you have a spare device and/or VM, we could setup a monitoring solution that will collect performance data from the PI Zero. Why to use a spare device? Because your system seems already overloaded and It doesn’t make sense to put additional stuff on it like InfluxDB + Grafana
To mute those random generator daemon logs, migrate to the new one:
apt install rng-tools5
To rule out Cron jobs completely:
systemctl stop cron
This will also disable hourly /var/log RAMlog clearing, to keep in mind in case something is logging heavily there and is able to fill it up to its 50 MiB limit within a few hours. But usually it should survive a few days or more.