Hello community,
I hope this may actually help someone.
TLDR: there's a (potential) bug in SQLiteHelper package
The background: I'm running LMS on the Western Digital MyBookLive (a NAS with crippled Debian Lenny) for years, updating time to time, but not too often. Couple of months ago when I had to replace the HDD in this unit, I've installed all new 7.8. It never managed to finish the scan but I couldn't be bothered investigating it at the time. Recently I've found some time, trawled the forum, found quite a few similar complaints and began experimenting.
The problem: when scanning, the script writes to the log the same error on every 200th scanned file:
then finally fails with another two also SQLite-related errors.
I've tried v7.8 stable and v7.9 nightlies - a few of them; had cache & logs folders sitting in default place, moved and edited the config, then moved and symlinked; even installed the whole thing in chroot with Wheezy.
I've been monitoring free space - it never hit any limit; watched the memory - there always been some available; wiped cache/configs million times; basically, every advice from the forum did not work or wasn't applicable.
Desperate, I've installed the old 7.7.3 version and it just worked.. The rest is pretty trivial - I compared the place where SQLite is initialised and tried removing the differences one by one. The solution that worked for me was to remove all cahe_size declarations by commenting out lines 43
and 104
in /usr/share/perl5/Slim/Utils/SQLiteHelper.pm
The scan on v7.9.0 has successfully finished for the first time for me!
I'm no expert in perl or SQLite so I don't really see why it fails when cache_size is set -- would appreciate if devs considered reviewing this package and fixing it for low-end NAS devices.
Sorry for a lot of words :)
Regards,
Kostya
I hope this may actually help someone.
TLDR: there's a (potential) bug in SQLiteHelper package
The background: I'm running LMS on the Western Digital MyBookLive (a NAS with crippled Debian Lenny) for years, updating time to time, but not too often. Couple of months ago when I had to replace the HDD in this unit, I've installed all new 7.8. It never managed to finish the scan but I couldn't be bothered investigating it at the time. Recently I've found some time, trawled the forum, found quite a few similar complaints and began experimenting.
The problem: when scanning, the script writes to the log the same error on every 200th scanned file:
Code:
Slim::Schema::Storage::throw_exception (122) Error: DBI Exception: DBD::SQLite::db commit failed: disk I/O error
I've tried v7.8 stable and v7.9 nightlies - a few of them; had cache & logs folders sitting in default place, moved and edited the config, then moved and symlinked; even installed the whole thing in chroot with Wheezy.
I've been monitoring free space - it never hit any limit; watched the memory - there always been some available; wiped cache/configs million times; basically, every advice from the forum did not work or wasn't applicable.
Desperate, I've installed the old 7.7.3 version and it just worked.. The rest is pretty trivial - I compared the place where SQLite is initialised and tried removing the differences one by one. The solution that worked for me was to remove all cahe_size declarations by commenting out lines 43
Code:
# $prefs->setChange( \&setCacheSize, 'dbhighmem' ) unless main::SCANNER;
Code:
# 'PRAGMA cache_size = ' . $class->_cacheSize,
The scan on v7.9.0 has successfully finished for the first time for me!
I'm no expert in perl or SQLite so I don't really see why it fails when cache_size is set -- would appreciate if devs considered reviewing this package and fixing it for low-end NAS devices.
Sorry for a lot of words :)
Regards,
Kostya