Mopidy Discourse

Timeout while scanning local library

I am having an issue that I’ve noticed from some other users, namely that I’m getting timeout errors from the mopidy-local extension while scanning the library. What is stranger still is that most of my library has scanned, with a few sparse exceptions at the beginning of the alphabet and then every artist starting with a letter after S. Here is an example output showing the error. I increased my timeout to 3000ms to no avail.

WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2011%5D%20The%20Weight/01%20-%20The%20Weight.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2011%5D%20The%20Weight/02%20-%20Age%20of%20Wild%20Spirits.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2011%5D%20The%20Weight/03%20-%20The%20Others.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2011%5D%20The%20Weight/04%20-%20The%20Focus.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2014%5D%20Feathering%20a%20Nest/01%20-%20Feathering%20A%20Nest.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2014%5D%20Feathering%20a%20Nest/02%20-%20Stuck.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2014%5D%20Feathering%20a%20Nest/03%20-%20Company.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2014%5D%20Feathering%20a%20Nest/04%20-%20Thirst.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2014%5D%20Feathering%20a%20Nest/05%20-%20Entitled.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Caddywhompus/%5B2014%5D%20Feathering%20a%20Nest/06%20-%20Layers.mp3: Timeout after 3000ms
WARNING [MainThread] mopidy_local.commands Failed scanning file:///media/hdd/music/Cate%20Le%20Bon/%5B2019%5D%20Reward/01%20-%20Miami.mp3: Timeout after 3000ms

I’m running Mopidy version 3.0.2 on Raspbian and mopidy-local version 3.2.0-1

I am facing the same issue that for some files the scanning files due to timeout.
Even verbosity 4 does not point me to what could be wrong.
The timeouted files itself are present and accessible. User mopidy has rwx access to the file.
For some files with special characters like è in the path i could fix the issue changing the path and also editing id3 tags. could you check if special chars in id3 tags might be the issue for at least some of your files?

Hey there,
i started to look deeper into the problem and tried to build a minimal example.
I found out, that the fail messages originate from “mopidy/scan.py”
Therefore i took one of the timouted files and tried to directly scan one file via the shell using
python3 /usr/lib/python3/dist-packages/mopidy/audio/scan.py URI
But surprisingly this worked without any issues, prints out all the scanned infos of the file and returns a 0.
I found out that this approach takes a timeout of 5000 ms. I just increased my timeout in the config to 5000 ms and now it works.

Hope this solves your issue, too rfnalfad

Sadly, even 5000ms is insufficient to remedy the situation. I’ll dig a little deeper, as the issue seems to stem from some smaller batch of files.