Maybe someone could help with a problem with the media scanner:
Regardless of choosing "Looking for new and changed media files" or "clear library and rescan everything", the scan does not finish. The scan runs till "Database Optimize (1 of 2)", then the server doesn't respond for a few minutes and after that it says "Media scan terminated unexpectedly (Scanning Progress)"
After that the new Albums do not appear under "New Music" or "Artist". But I can find them by searching for the Album Title.
I'm running "Logitech Media Server Version: 7.9.1 - 1499900819 @ Wed Jul 12 23:26:54 UTC 2017" on a Raspberry Pi 3 (Raspbian). Maybe This has to do with any Plugins? I'm using Bookmarks, Music and Artist Information, Music Walk With Me, What Was That Tune? and Spotty. I recently tried some of the erland isaksson plugins but uninstalled them all. And I deactivated Full text search because I get much better results without it.
These are the last lines in the scanner.log just before the scan terminates unexpectedly:
I could send the whole scanner.log if necessary.Code:[17-08-02 07:29:32.2778] Slim::Utils::SQLiteHelper::updateProgress (463) Notify to server OK [17-08-02 07:29:32.2787] Slim::Music::Artwork::__ANON__ (738) precacheArtwork finished in 3.99443387985229 [17-08-02 07:29:32.2793] Slim::Music::Import::endImporter (643) Completed precacheArtwork Scan in 4 seconds. [17-08-02 07:29:32.2802] Slim::Schema::forceCommit (2158) Syncing to the database. [17-08-02 07:29:32.4737] Slim::Music::Import::runScanPostProcessing (435) Starting Database optimization. [17-08-02 07:29:32.4753] Slim::Schema::optimizeDB (402) Start schema_optimize [17-08-02 07:30:46.5224] Slim::Utils::SQLiteHelper::updateProgress (439) Notify to server: ["progress:1501651772.47674||importer||dboptimize||1||2||"] [17-08-02 07:30:46.5393] Slim::Utils::SQLiteHelper::updateProgress (463) Notify to server OK [17-08-02 07:30:46.5404] Slim::Schema::forceCommit (2158) Syncing to the database. [17-08-02 07:30:46.6083] Slim::Utils::SQLiteHelper::vacuum (522) Start VACUUM library.db
Results 1 to 7 of 7
-
2017-08-02, 00:13 #1
- Join Date
- Aug 2013
- Posts
- 202
Media scan terminated unexpectedly
-
2017-08-02, 00:44 #2
- Join Date
- Aug 2013
- Posts
- 202
The RAM usage is very hight just before the scan terminates. Maybe there is something wrong with the RAM?
-
2017-08-02, 01:02 #3
How large is your library? What's your memory configuration in Settings/Advanced/Performance? Do you have swap enabled?
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
-
2017-08-02, 01:36 #4
- Join Date
- Aug 2013
- Posts
- 202
It was set to "Maximum". I tried "Normal" and the problem was solved. The scan took a little longer but it ran through without Problems. Thank you for the hint. I have to remember to set it to normal before starting a scan and set it back to Maximum after the scan (for the spotty plugin).
Is it a LMS or a raspbian setting? What do you recommend?
-
2017-08-02, 02:00 #5
Media scan terminated unexpectedly
>> What's your memory configuration in Settings/Advanced/Performance?
> It was set to "Maximum". I tried "Normal" and the problem was solved.
> The scan took a little longer but it ran through without Problems. Thank
Did you try "High", too?
>> Do you have swap enabled?
> Is it a LMS or a raspbian setting? What do you recommend?
That would be on the OS level (Raspbian). It might help to iron out that
peak memory usage. But in general you shouldn't run a configuration
which needs swap space all the time, as it can wear out the SD card (and
would be slow, too).
I'm using "Maximum" with piCorePlayer. But then there's nothing else
running on that device. I don't even use the audio part. The description
for that setting says "if you have more than 1GB of RAM" :-). Using it
with less memory obviously comes with some risks.
--
Michael
-
2017-08-02, 02:18 #6
- Join Date
- Aug 2013
- Posts
- 202
Yes, the scan terminated with both, High and Maximum. Only normal was fine.
I don't remember if I changed the raspbian default settings. Sounds like changing the performance to normal for the scan is the best solution.
I have a Pi Zero with piCorePlayer in the bedroom. (I can use a timer that pulls the plug without worrying).
Maybe I should try piCorePlayer for the server, too. But I feel much more comfortable with raspbian, most of the terminal commands are the same as in ubuntu and I can easily install other stuff with apt-get. I wouldn't know how to install or configure anything on piCore linux.
-
2022-07-03, 07:58 #7
- Join Date
- Jul 2022
- Posts
- 1
Thanks!
Thank you both for posting this solution. Nine years later, it solved my problem with LMS on a NetGear ReadyNAS:
Logitech Media Server Version: 7.9.0 - TRUNK @ UNKNOWN
Operating system: Debian - EN - utf8
Platform Architecture: x86_64-linux
Perl Version: 5.20.2 - x86_64-linux-gnu-thread-multi
Audio::Scan: 0.95
Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
I had been adding a lot of content to the library lately, and at some point it could no longer successfully complete a scan. The symptoms were the same as in the OP:
The scan runs till "Database Optimize (1 of 2)", then the server doesn't respond for a few minutes and after that it says "Media scan terminated unexpectedly (Scanning Progress)"
After that the new Albums do not appear under "New Music" or "Artist".
I changed "Advanced" -> "Performance" -> "Database Memory Config" to "Normal" and the library was successfully scanned (completely).Last edited by wspd; 2022-07-03 at 08:00.