pssc / ha-addon-lms

Logitech Media Server Addon for Home Assistant
GNU General Public License v3.0
56 stars 13 forks source link

since update to 0.0.53 very high cpu usage and error "inactive database handle" #24

Closed renarena closed 1 year ago

renarena commented 1 year ago

after updating i have a lot of this errors:

[23-01-07 21:00:52.1203] Slim::Utils::Misc::msg (1325) Warning: [21:00:52.1203] EV: error in callback (ignoring): DBIx::Class::Storage::DBI::__ANON__(): DBI Exception: DBD::SQLite::st execute failed: attempt to execute on inactive database handle [for Statement "
        INSERT INTO scanned_files
        (url, timestamp, filesize)
        VALUES
        (?, ?, ?)

Since update the cpu usage of home assistant goes from 50% to 100% if i start lms. lms shows cpu usage of ~78%. This doesnt change if i stop scanning the library (which seems to work as the deleted lib was rebuild).

Logitech Media Server Version: 8.3.0 - 1667251155 @ Fri 04 Nov 2022 09:14:25 AM CET
Hostname: fc57b866-lms
IP-Adresse des Servers: 192.168.1.222
Server-HTTP-Portnummer: 9000
Betriebssystem: Debian (Docker Home Assistant Addon) - DE - utf8
Plattformarchitektur: x86_64-linux
Perl-Version: 5.32.1 - x86_64-linux-gnu-thread-multi
Audio::Scan: 1.05
IO::Socket::SSL: 2.069
Datenbankversion: DBD::SQLite 1.58 (sqlite 3.22.0)
Anzahl erkannter Player: 4
pssc commented 1 year ago

Sounds like your installation has become corrupt somehow.

Full logs may help.

Do you have sufficient free space?

It could be a bug in LMS but my test install has a large number for tacks 60K+ on seems ok on 8.3...

try each of these in order by stopping the addon and start after with each one

restore a older backup copy of /config/lms remove /config/lms/cache remove /config/lms

renarena commented 1 year ago

Free space in HA was less then 1 GB. I installed backup with no change, then deleted cache - better - upgraded lms again. Seems to work normally now.

pssc commented 1 year ago

@renarena I am going to but this down to a corrupt db due to grade having issues for reasons and probably an LMS issue rather than a addon issue.