Raspberry Pi 0 Devices shut down, and containers sometimes fail to start

Hi,

I have 4 devices setup with BalenaCloud that have 3 containers each.
They run fine with CPU usage within 20%, temperature stabilizing at around 65C, and the program works fine.
They stream videos to my server.
Everything functions just fine.
However, at random times, the devices will just appear offline in the BalenaCloud Dashboard and naturally the streaming will have stopped. Nothing brings them back except for a hard power cycle. There is no indication in journal or any other logs that I’ve seen of why this occurred. They turn off at random times (1 hour of operation, 4 hours, etc…).

How do I find out what is causing this?

The other (smaller) problem that I have is that upon a power cycle, the containers SOMETIMES fail to start!!! I can manually start them, but why are they not auto-starting? Once again, nothing in any logs I’ve searched through. And yes, my docker-compose file has restart: always set… but it does nothing.

It might be helpful to turn on the persistent logging feature: Device Logs - Balena Documentation
Normally the logs are cleared on reboot, so enabling persistent logging may enable you to troubleshoot the issue.

@mkaca
Maybe the issue lies within your power supply for the RPI. I had encountered the same issue and the reason was the power supply.

2 Likes

I tried this with different types of power supplies - same results.
I also tried running the exact same logic with the same hardware with RaspberryPi OS instead of BalenaOS, and it worked perfectly fine.

1 Like

@mkaca
It seems that your device is just getting disconnected from the internet. Can you tell me what network configurations are you using like wifi/ethernet/cellular etc.

@mkaca could you please share the logs of the devices? Thanks!