Products > Embedded Computing

Is it considered normal to have to periodically reboot a Raspberry Pi?

(1/15) > >>

e100:
I have a Pi that runs a bunch of programs including Node-red, Grafana, Influxdb, Mosquitto, VNC and my own Java program that runs a home automation system.
Generally this runs fine, albeit a bit slowly due to the amount of data being received and logged to SSD.

During testing I was rebooting every day and didn't see any problems.
Now I run the system continuously and every few weeks the OS kills a bunch of programs presumably because it has run out of memory or some other resource. From what I've seen on the web this is standard Linux behavior designed to prevent the system from completely grinding to a halt. This seems to be a bit different from Windows which tries to keep everything running until the bitter end where everything does grind to a halt.

For Linux is the only solution to pre-emptively reboot or kill/restart processes on a schedule so the OS never runs out of resources? I could restart things in the early hours of the morning when activity is at a minimum, but this seems like a drastic measure, and obviously this means there is a window of time where the system isn't doing the job it's supposed to be doing.

My example is relatively trivial, but how do important systems such as water, gas or electricity utilities keep their systems functional all the time? Do they have multiple systems running in parallel shadowing each other so they can periodically take one off line to reboot or restart its processes?

Ed.Kloonk:
To broadly answer your question, the short answer is that the Pi is in a different price class compared to critical industry components and software.

Is your problem hardware (interference) or software (bugs)? If you tell us a bit more we may be able to help you lock down what is going wrong.

Have you done any logging of resources to try and spot the culprit?

BradC:

--- Quote from: e100 on February 26, 2022, 04:15:10 am ---For Linux is the only solution to pre-emptively reboot or kill/restart processes on a schedule so the OS never runs out of resources? I could restart things in the early hours of the morning when activity is at a minimum, but this seems like a drastic measure, and obviously this means there is a window of time where the system isn't doing the job it's supposed to be doing.
--- End quote ---

The solution is to find and fix the memory leak. I have pi's with hundreds of days uptime.

james_s:
I have 3 of them in service 24/7, one had an uptime of 280 days when I tripped over the power cord, it's currently up to 266 days. Another was rebooted about 4 months ago when I last updated Home Assistant. The third probably gets rebooted 2-3 times a year when Kodi gets updated. If you use a decent quality SD card and an adequate power supply a Pi should be very stable.

wilfred:
It doesn't sound like normal Linux behavior to me. And you say presumably but presuming won't get you anywhere. You need to try to gather some data. It may not even be a memory issue.

It could be faulty hardware or a marginal power supply or a flakey SD card. Maybe one of your applications does have a memory leak or some other bug. You need to do more detective work.

But Linux ought to be able to run without rebooting for ages.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version