1

I've read the useful question why is the minidlna database not refreshed and minidlna - not indexing files but this problem is different: It seems to stop scanning files at a certain file/after a certain directory.

Set up:

  • Running on Raspberry PI
  • Minidlna v1.2.1 from Raspbian Buster
  • Large music collection (although it only gets up to a few hundred files), a mix of formats.
  • fs.inotify.maxuserwatches=65536 in sysctl.conf
  • User minidlna has read access to full media library
  • /var/cache/minidlna where it keeps its database files, is on an ext4 partition.
  • Logging is set to:
    log_level=debug,artwork=debug,database=debug,inotify=debug,scanner=debug,metadata=debug,http=warn,ssdp=debug,tivo=warn
    
  • Watching top, the system does not seem to run out of memory while scanning.
  • The only error in the log is:

    [2019/11/14 20:07:35] tagutils/tagutils-mp3.c:695: info: Bad header... dropping back for full frame search [/drive/files/Music/00 Various/some-song.mp3]

    But the scan appears to continue after this.

The problem lines seem to be here:

[2019/11/14 20:07:35] scanner.c:730: info: Scanning /drive/files/Music/00 Various/SomeFolder
[2019/11/14 20:07:37] monitor.c:178: debug: Add watch to /drive/files/Music

where it looks like it stops scanning and starts adding watches; there's no errors or warnings.

Stumped!

artfulrobot
  • 20,637
  • 11
  • 55
  • 81

1 Answers1

0

I had to run
sudo minidlnad -d -R to find I had a file with an invalid JPEG in it. Luckily, I could just delete the file. If that's not an option for you, there may be some way of editing the metadata for whatever file you have a problem with.

Geoff Johnson
  • 1,311
  • 1
  • 8
  • 3
  • thanks, but I've tried deleting the databse and rescanning, it always gets stuck somewhere - but the problem is it doesn't tell me where it got stuck, and with 18k files it's a bit of a needle in a haystack! – artfulrobot Jun 02 '20 at 16:41
  • That's why running it in the terminal, as opposed to as a service, helps. The last file mentioned when it stops is the one to look at. – Geoff Johnson Jun 03 '20 at 17:07