Logbook takes forever and halts pi3, out of memory

HI,

The issues of logbook (and History) taking forever aren’t over yet. As a matter of fact, I cant use them at all, fr the system halts and only a power cycle by pulling the cord can get my Pi back again. Out of memory, and completely unresponsive.

Hassio 75.2 here, the rest of the system seems to run fine, and I have no memory reports in the system monitor

logbook:

  include:
    domains:
      - sensor
  #    - switch
  #    - media_player
      - light
      - automation

and 6 device_trackers (phones)

what could be going on, how could I test… thx for any help

Yeah, I’m getting the same. Loading the logbook results in everything becoming unresponsive/hass crashing.

rebooting as we speak, commented out the domain sensor to see if my mqtt sensors are the cause for this. Too bad if it were so, missing these would be a real let down, but the Pi might simply be too small a device for this.

well that didnt help, clicking Logbook instantly drowns the Hassio instance to a halt…

Did you have a look at db size? Probably there are too many entries to display and it kills the pi. If you suspect mqtt you would probably need to wait for the next day after commenting them out since the logbook by default shows entries for the current day.

I have some mqtt sensors but they do not report with high frequency. No problems with logbook.

thank you, Ill wait another day :wink:
I dont have a ‘db’ but use MariaDB so cant see whats happening. Before, It did grow rather extensively, and ‘purge’ wouldn’t do anything. Deleting the db would help, but only start the issue from the beginning.

I have the same problem. History is ok (bit slow) , but the logbook component is a piece of crap, it has never really worked. it does not matter how many sensors you want it do track, it craps out. Ive tried local sqlite3, mariadb, postgresql… nothing helps it. Probably poor coding with lots of outer joins.

It shouldn’t really matter how large the db is, since it only shows 24 hours worth, which for a db is peanuts to query. Can only conclude poorly written SQL calls that returns a ****load of rows.

Just happened again…

Although I have an alert set for when memory usage passes threshold 80%, this doesn’t kick in and the Pi simply halts and becomes unresponsive. Only option left is a hard reset…

Shouldn’t/couldnt Hassio build a security setting preventing this from happening? Of course the logbook should start to behave normally for once, and hope this will get on radar soon…

Any thought s how to proceed?