Grafana Crashing Every 2 Minutes on Raspberry Pi

I recently migrated from OpenHAB 2 to OpenHAB 4 on my Raspberry Pi and decided to set up Grafana along with InfluxDB using the openhabian-config tool. Everything seemed to go smoothly during the installation, but I’ve encountered a recurring issue where Grafana crashes and restarts every 2 minutes. Here’s what I’ve observed and tried so far:

Observations

  1. Log Analysis: I reviewed the Grafana logs and noticed an error related to an illegal instruction (SIGILL). This typically indicates that the CPU encountered an instruction it couldn’t execute, which could be due to architecture mismatches or corrupted binaries.

  2. Resource Usage: My Raspberry Pi is a 4th generation model with 2GB of RAM. While Grafana is running, the CPU usage doesn’t seem excessively high, but the memory usage fluctuates significantly.

  3. Dependencies: I ensured that all dependencies for Grafana and InfluxDB were properly installed and up-to-date.

Troubleshooting Steps

  1. Updated Grafana: I tried updating Grafana to the latest stable version available in the repositories. However, the issue persisted.

  2. Checked Architecture Compatibility: I verified that the Grafana package is compatible with the ARM architecture of the Raspberry Pi. It appears to be, but I’m still unsure if this is the root cause.

  3. Reinstalled Grafana: As a last resort, I completely uninstalled Grafana and InfluxDB, then reinstalled them from scratch. Unfortunately, the problem remains.

  4. Monitoring System Resources: I started monitoring the system resources more closely using top and htop. I noticed that when Grafana crashes, the memory usage spikes temporarily, but it’s unclear if this is a cause or symptom.

Questions and Requests

  • Has anyone else experienced similar issues with Grafana on a Raspberry Pi?
  • Are there specific configurations or optimizations I should implement to stabilize Grafana?
  • Could the issue be related to the interaction between Grafana and InfluxDB, or is it more likely a standalone Grafana problem?

I appreciate any advice or insights you can provide to help resolve this issue. Grafana is a valuable tool for visualizing my home automation data, and I’m eager to get it working smoothly again.