I know what I'm going to ask is a pretty general question, but it's my first Linux installation and I don't know how to start looking where the problem is.

I have a RaspberryPi 4 / 8GB ram with Ubuntu Server installed. I'm running a couple of service that I need to maintain an airplane radar I have at home. It worked smoothly for 2 months, then it started having this problem: after 24-36 hour from restarting the RPi becomes unreachable (ping, SSH, HTTP server) and the only way to fix is unplug and plug again power connector.

I have any idea of what could be the problem, but I also don't know how to look for the cause. Is there any system log that I can read after restarting that could tell me what happened?


Here is the log: https://pastebin.com/tHNDM80e.

I see that a problem happend with the memory at around 13.50, but the Rasp went offline one hour later. Are these problems correlated? DO you know how can i solve?

  • Is your Raspberry idle or working? – jrglndmnn Jan 14 at 6:54
  • It is serving some API for a flight radar. In particular it is processing the data from another Rasp on the roof near the antenna and serve it as json file a web page (served by another computer). – L.A. Jan 14 at 7:30
  • 1
    The problems may be correlated. The oom killer is used to free up memory when the system has none left. It basically starts killing processes on your system until there’s enough memory. This can easily kill critical services because it doesn’t know what’s “important”. Did you check your swap space? You can use a tool like htop to look at what’s using memory. – Philip Couling Jan 14 at 9:17
  • FromJan 7 13:50:59 pi-server kernel: [183623.993681] Free swap = 0kB Jan 7 13:50:59 pi-server kernel: [183623.993684] Total swap = 0kB, it seems there is no swap available and no swap at all. The application being killed is modesmixer2 Out of memory: Killed process 1714 (modesmixer2). And right after there are issues with the ethernet connection it seems. There are some settings to avoid some processes from being killed and I guess you could also stop/disable some processes you're not using (wpa_supplicant is not really useful if connected with Ethernet for example). – Pierre-Alain TORET Jan 14 at 11:00
  • Is there a way to restart modesmixer2 before it makes the Rasp runs out of memory? As you said this is probably the cause of all problems, and if it is stopped before it block all the system would be fine. – L.A. Jan 14 at 11:43

The vast majority of logs are found in the /var/log directory.

There is a log called syslog (/var/log/syslog) which is the first place you should look.

If that shows nothing then double check you have a reasonable sized swap enabled (type cat /proc/swaps, units in KB). Unlike RaspberryPi OS, Ubuntu server may not default to having swap at all. If you run out of RAM bad things can happen.

I'll also mention hardware. Power supply can be a problem, and can make it go down hard (with no chance to log), but the power many not drop enough to trigger a reset; meaning it will just hang. The Raspberry Pi 4 has a particular power supply requirement that is easily larger than older 5 watt (5V 1000 mA) usb power supply. The bare board alone typically draws 600mA.

Additionally this can be a problem when you run from USB hard drives. Sometimes the power draw from them can be a problem while spinning up the disk. This can sometimes result in the hard drive simply stopping. Though you should see some mention of this as long as your syslog isn't on the hard drive.

  • I'm sure that I'm proper suppling the Rasp. I've bought the official supplier. I've read the log you told me, but I can't figure out what is the problem. I'm adding the log in the question – L.A. Jan 13 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.