My PI4b HA is starting to crash

Hi,

I have been running HA for the past year on a PI4b with a class 10 SD card and its has been flawless for a year. Not one issue. But over the past couple of weeks its starting to hang up every few days. I have taken a screen shot of the log below.

I am a novice with very basic programming skills (well none really :slight_smile: )

Anyway any help would be great to see what’s going wrong. Many thanks

First, take backups of all the data you can.

After that, you’ve probably worked out that there are database issues.

  • sqlite3 is complaining the database file wasn’t shut down cleanly, which could be both a cause and symptom of crashes.
  • The InfluxDB server isn’t running, which suggests something similar

I’d suggest using code blocks and not screenshots as reading images is a PITA, and prevents goggling of errors.

Most modern RPi issues are power supply rather than uSD cards these days as wear-levelling improved a lot. In this case, it’s hard to say what the root cause is - but you do need to fix the sqlite3 database.

I’d suggest (as always) search for the error message - e.g. could not validate the sqlite3 database or corrupt database.

Some hits suggest deleting the database & core.device_registry file, but that seems very strange to this greybeard ex-dba! Lock files for the database might be OK to clean out, but unless the db file is re-created somehow from another, deletion seems silly.

That’s as much I personally can help - just make sure you have as many copies and backups as possible to give options for recovery.

I‘d say your SD card is dying, same as my did. after two years. I switched to a small x86 mini-pc (Minisforum N40) with an embedded eMMC (SSD).

Sold my RPI4 for a higher price than I bought it two years ago.

If you have shell access as root, run command dmesg -T to identify block device related issues.

1 Like

Thanks for that first time posting here so hopefully I have pasted these error logs in correctly.

2023-01-18 20:30:00.931 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-01-18 20:30:45.099 WARNING (Thread-35) [matplotlib.font_manager] Matplotlib is building the font cache; this may take a moment.
2023-01-18 20:31:04.054 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2023-01-18 20:31:04.061 WARNING (MainThread) [homeassistant.components.media_player] Updating denonavr media_player took longer than the scheduled update interval 0:00:10
2023-01-18 20:31:04.063 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.denon_avr_x1700h is taking over 10 seconds
2023-01-18 20:31:04.123 WARNING (MainThread) [homeassistant.components.denonavr.media_player] Timeout connecting to Denon AVR receiver at host 192.168.1.49. Device is unavailable
2023-01-18 22:21:10.977 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /os/info request
2023-01-18 22:21:12.042 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /core/info request
2023-01-18 22:21:12.046 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /info request
2023-01-18 22:21:12.051 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /supervisor/info request
2023-01-18 22:21:12.055 ERROR (MainThread) [homeassistant.components.hassio] Error fetching hassio data: Error on Supervisor API:
2023-01-18 22:27:09.831 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:1c8bf33c-0017-45de-9fcd-9b9e004b2a74, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.1.55\', port=9197, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=8005851503855289545), ConnectionRefusedError(111, "Connect call failed (\'192.168.1.55\', 9197)"))', None)
2023-01-18 22:27:09.844 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:6ba2b7fc-4b70-4f0b-836a-9721684c0754, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.1.55\', port=9197, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=8005851503855289545), ConnectionRefusedError(111, "Connect call failed (\'192.168.1.55\', 9197)"))', None)
2023-01-18 22:27:09.863 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:5a63f525-3f6a-4691-bf57-33bccdd8e721, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.1.55\', port=9197, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=8005851503855289545), ConnectionRefusedError(111, "Connect call failed (\'192.168.1.55\', 9197)"))', None)
2023-01-18 22:27:36.701 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed subscribing to service: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.1.55\', port=9197, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=8005851503855289545), ConnectionRefusedError(111, "Connect call failed (\'192.168.1.55\', 9197)"))', None)
2023-01-18 22:53:45.620 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed subscribing to service: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.1.94\', port=9197, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=8005851503855289545), ConnectionRefusedError(111, "Connect call failed (\'192.168.1.94\', 9197)"))', None)
2023-01-18 22:53:55.512 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed subscribing to service: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.1.94\', port=9197, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=8005851503855289545), ConnectionRefusedError(111, "Connect call failed (\'192.168.1.94\', 9197)"))', None)
2023-01-18 22:56:25.513 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2023-01-18 22:56:25.520 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_8_series_75 is taking over 10 seconds
2023-01-19 02:39:05.177 WARNING (Thread-7) [pychromecast.socket_client] [Kitchen display(192.168.1.250):8009] Heartbeat timeout, resetting connection
2023-01-19 02:39:12.373 ERROR (Thread-7) [pychromecast.socket_client] [Kitchen display(192.168.1.250):8009] Failed to connect to service ServiceInfo(type='host', data=('192.168.1.250', 8009)), retrying in 5.0s
2023-01-19 03:42:43.529 WARNING (MainThread) [homeassistant.components.denonavr.media_player] Timeout connecting to Denon AVR receiver at host 192.168.1.49. Device is unavailable
2023-01-19 06:45:48.165 WARNING (MainThread) [homeassistant.components.cloud.google_config] Error reporting state - 14: Stream refused by server

Is that HA OS?

Its from the HA Core Logs, the rest of the items such as supervisor etc are not showing errors just green entries

Did you try that? Don’t know if there is a root shell with HA OS, but that command must be run on the OS itself.

1 Like

No not yet, but I will, in work now so cant access it.