Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Problem: Library update in progress message
#11
Yes, I use a USB hub, found that the power supply on it was low. Now I connected another power supply, launched the library update again. I will write about the result.
#12
But nothing worked. Right after updating the library (when the spinner stopped spinning) I managed to update a separate folder once, but then the system itself loaded something and froze. Didn't respond to anything. I waited an hour and restarted it. And now I can't update a separate folder, it says that the update has already started.

Attached is a screenshot of the top command when the system froze.


Attached Files Thumbnail(s)
   
#13
Looks like you might have memory constraints.  Try increasing the swap file size (google will show you how).

ETA: Although why your swap file is full is a mystery.  My 2GB Pi4 never touches it's swap file....
----------------
Robert
#14
(06-06-2025, 07:12 AM)the_bertrum Wrote: Похоже, у вас могут быть ограничения памяти. Попробуйте увеличить размер файла подкачки (Google покажет вам, как).

ETA: Хотя то, почему ваш файл подкачки заполнен, остается загадкой. Мой 2 ГБ Pi4 никогда не трогает свой файл подкачки...

Сколько альбомов в вашей библиотеке?
#15
I seem to have gotten rid of the freeze, I turned off "Log to RAM" in Configurate - System.
But a separate folder still doesn't want to update

Doesn't anyone know the sign by which the system determines that the library is in the process of updating?
#16
I don't understand what you mean by updating a separate folder.
Have you got logging levels turned above default at all? Log to RAM is causing no issues for me.
----------------
Robert
#17
@alexarz

It's very hard to diagnose these kinds of problems remotely.

Given the screen output you posted I'm tempted to guess, like @the_bertrum, that you are exhausting your system resources. The system slows down as a result.

You asked (in Russian) how many albums did he have. What matters more is how many tracks (music files) and how much metadata each contains. Unless told not to (with .mpdignore files), MPD will scan every directory looking for tracks (music files). Each music file is processed for certain metadata with which MPD builds its database. MPD infers albums from the track metadata, not from the directory organization. The database grows as tracks are added. It's stored in the file /var/lib/mpd/database and is memory resident during operation.

How many tracks is too many? That's a hard question to answer. My collection is modest, slowly approaching 10K tracks. I have not had problems with any of Pi Zero 2W, Pi 3A, Pi 3B+, Pi 4B (1GB or more), and Pi 5B. Swap space is often in use with the Zero 2W and 3A, which have only 500MB RAM, while swap space is rarely in use in the larger memory models.

I'm guessing 100K tracks is beginning to stress the system but perhaps others could contribute real numbers. A quick check: run 'mpc stats' from the command line --- for historical reasons, it reports music tracks as "songs".

As an aside: The mediainfo utility is called within the music-library.php module. It is used to read files and extract metadata. I do not consider it a resource hog. It's showing up in your top output because the library update is still running.

You can try it from the command line to see what kind of output it creates

Example

Code:
rho@moodey:~ $ mediainfo '/mnt/SDCARD/Stereo Test/LRMonoPhase4.flac'
General
Complete name                            : /mnt/SDCARD/Stereo Test/LRMonoPhase4.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 2.02 MiB
Duration                                 : 38 s 762 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 438 kb/s
Album                                    : Stereo Test
Album/Performer                          : Koz
Track name                               : LR Channel And Phase
Track name/Position                      : 1
Track name/Total                         : 1
Performer                                : Koz
Genre                                    : Utilities
Recorded date                            : 1997
Writing application                      : X Lossless Decoder 20161007
Cover                                    : Yes
Cover type                               : Cover (front)
Cover MIME                               : image/png
TITLESORT                                : LR Channel And Phase
ARTISTSORT                               : Koz
ALBUMSORT                                : Stereo Test

Audio
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 38 s 762 ms
Bit rate mode                            : Variable
Bit rate                                 : 431 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Compression mode                         : Lossless
Stream size                              : 1.99 MiB (99%)
Writing library                          : libFLAC 1.3.1 (2014-11-25)
MD5 of the unencoded content             : AF69A3672BDA1FE51CBBB468195DEF21

Regards,
Kent
#18
(06-06-2025, 04:10 PM)TheOldPresbyope Wrote: I'm guessing 100K tracks is beginning to stress the system but perhaps others could contribute real numbers. 

Almost 65,000 tracks, works well. (I share my backup with some friends so we all have one that is outside of our own environment, that`s why i have so many).
#19
Thanks for the translation Kent.  My track count is thus:
Code:
Artists:   1404
Albums:     880
Songs:    10871
I used to experience issue with moOde dying on my Pi3, which was caused by the memory filling up.  That's why moOde now uses a swap file.  It look for all the world like this is a similar issue here.  Easy to experiment with it by making the swap file bigger @alexarzshould give that a go first off.

If that works, maybe we can then start to work out what is hogging memory in this case where it seems not to in any others.
----------------
Robert
#20
I've a PI4 with 2GB ram and a ~31000 flac tracks, 2791 albums library.
Mem used: 285m
Buff/cache: 440m
Mem free: 1189m
Swap used: 0mb
%cpu: 0.5-1.7 us, 0.6-1.6 sy

But I see you've a lot of processes I don't have running, like chromium, Xorg, mediainfo, ... Whatelse are you running on the PI?


Forum Jump: