Raspberry Pi 5 Occasionally Freezing During Long-Term Sensor Data Collection

Hello everyone,

I’m currently developing a Raspberry Pi 5 based monitoring system that collects data from several sensors, logs information locally, and periodically uploads measurements to a remote dashboard.

The system works well most of the time, but during long-duration testing I’m occasionally seeing freezes that are difficult to reproduce consistently. Sometimes the Pi runs for weeks without issues, while other times it becomes unresponsive after several days of continuous operation.

Current setup:

  • Raspberry Pi 5

  • Raspberry Pi OS

  • Python-based data collection

  • I2C and UART sensors

  • Local SQLite database

  • Ethernet and WiFi connectivity

  • External power supply

Observed behavior:

  • Rare system freezes

  • Data collection stops unexpectedly

  • Remote access becomes unavailable

  • No obvious hardware errors reported

I’ve reviewed memory usage, storage health, power stability, and application logs, but I haven’t yet identified the root cause.

Questions:

  1. Have you encountered similar long-term stability issues on Raspberry Pi systems?

  2. What logging or monitoring tools have been most useful for diagnosing intermittent failures?

  3. Are there common power or thermal issues that only appear after extended runtime?

  4. Have you found software bugs or hardware issues to be the more common cause in situations like this?

PCB Design Question:

The next revision will move some of the supporting circuitry from development boards onto a dedicated carrier board that interfaces with the Raspberry Pi. The PCB will likely be manufactured through PCBWay (Need suggestions, personal experience, if someone has worked with them)

For those who have designed Raspberry Pi carrier boards:

  • What PCB layout practices have had the biggest impact on reliability?

  • Have you found additional ESD protection worthwhile on sensor and communication interfaces?

  • How aggressively do you separate noisy power circuits from sensitive signal paths?

  • Which fabrication or testing options have provided the most value?

I’d appreciate hearing from anyone who has deployed Raspberry Pi systems in long-term monitoring or industrial environments.

  1. Not widely
  2. I’d watch the on-board temps and/or add them to a log to see if temperature might be related to the failures
  3. Sure, depending on temp… you could take a look at heat sinks, passive coolers or fans
  4. Sometimes longer run periods can has issues with repeated SD card writes…this might be related to the databasing; I use SanDisk Extreme cards and haven’t encountered any…might be worth swapping (unless of course you’re using SSD). Conversely, it also might benefit from switching to an SSD in place of SD