Sonic Analysis - scanning finished days ago but no results showing

Server Version#: 1.24.2.4973
Windows 10 OS Build: 19043.1237Plex Media Server.zip (544.3 KB)

My sonic analysis processed all my (about 6,400) albums for about 2 weeks and finished up. Four albums did not process correctly so I replaced them, and after this the logs say that the music analysis processing and indexing is finished, since about 10 days.

But I have yet to see any indication that this feature is activated at all in Plexamp (Android, v3.7.1 - no sonically related tracks or albums like in the blog post, no new related playlists are showing) or in the Plex web interface (random album > metadata-related albums are showing, but no sonically related albums). You’d think it would find some sonically related tracks with about 65,000 tracks analyzed.

Is there some way I can see that the sonic analysis is “switched on” correctly on the server? Music library advanced settings has “Sonic analysis” checked.

Any help is appreciated!
Regards
MĂĄrten

Take a look into the Plex data folder, and there into the subfolders
Plug-in Support\Databases
Is there a subfolder present, named like Music Analysis n?

Try the latest beta server version. It contains an important bugfix regarding albums where analysis failed.

Yes, there is an empty folder there named “Music Analysis 6 (processing)” verbatim.

Thanks, I will located the beta server version and test it out.

If your server was rudely interrupted while performing the sonic analysis, you might have to delete this Music Analysis n folder (while the server is not running).

Turned off server and removed the folder. Turned server on again, did a new music scan and interrupted it to get to sonic analysis indexing. Logs:

Sep 20, 2021 14:47:32.816 [5924] Debug — [MusicAnalysis] Fetching all analysis data from tracks from section 6.
Sep 20, 2021 14:47:32.816 [5924] Debug — [MusicAnalysis] Activity: updated activity 2e1b0401-c668-4160-a09f-1f981eee8df7 - completed 20.0% - Sonic Analysis
Sep 20, 2021 14:47:46.601 [5924] Debug — [MusicAnalysis] Building track index with 64501 tracks.
Sep 20, 2021 14:47:46.601 [5924] Debug — [MusicAnalysis] Activity: updated activity 2e1b0401-c668-4160-a09f-1f981eee8df7 - completed 40.0% - Sonic Analysis
Sep 20, 2021 14:47:46.602 [5924] Debug — [MusicAnalysis] Building album index with 6432 albums.
Sep 20, 2021 14:47:46.602 [5924] Debug — [MusicAnalysis] Activity: updated activity 2e1b0401-c668-4160-a09f-1f981eee8df7 - completed 60.0% - Sonic Analysis
Sep 20, 2021 14:47:46.603 [5924] Debug — [MusicAnalysis] Building artist index with 2678 artists.
Sep 20, 2021 14:47:46.604 [5924] Debug — [MusicAnalysis] Activity: updated activity 2e1b0401-c668-4160-a09f-1f981eee8df7 - completed 80.0% - Sonic Analysis
Sep 20, 2021 14:47:46.605 [5924] Debug — [MusicAnalysis] Activity: Ended activity 2e1b0401-c668-4160-a09f-1f981eee8df7.
Sep 20, 2021 14:47:46.606 [5924] Debug — [MusicAnalysis] Indexes completed.

And after this the empty folder “Music Analysis 6 (processing)” is back again.

Did you try the server update?

Yes. I upgraded to beta version 1.24.3.5033-757abe6b4 and the same thing happens. The folder “Music Analysis 6 (processing)” reproduces itself after music scan and sonic analysis index completed.

I checked Plexamp and now I get the “On this day” as a new feature on start page (yay, a little progress!), but nothing else really.

Hold on, got a new log row that I haven’t seen before:

Sep 20, 2021 15:07:53.988 [13512] Debug — Activity: registered new sub-activity 495ec656-8e34-4843-bb82-9a9915a72c7a - "MusicAnalysis" parent: 495ec656-8e34-4843-bb82-9a9915a72c7a overall progress: 75.0% (3/4)

Gonna wait this one out and see if this will fix it.

EDIT: Seemed to be a dud. Back to square one.
Thanks @OttoKerner for all the suggestions. If you come up with anything else for me to try, I’m all ears.

We’ve improved the logging around the process for the next release (or the one after), but it looks like at least one of the indexes is running into errors building.

The only reason I’ve seen for this in the past is that the disk didn’t have enough free space, is that a possibility here? Otherwise we’ll have to wait to get a more detailed error message in the next release.

It is a possibility, I usually secure that there is enough space but I can’t be totally sure over the course of the two weeks processing.

Is there a way to redo the sonic analysis scanning? I can wait two more weeks, and ensure there is at least 50GB of free space during this time.

Hi i’m having a similar issue . I have over 18000 albums and after a couple of weeks of sonic analysis my pc had an issue where windows file explorer started to close down , so had to do a reboot and now sonic analysis wont progress past 4135 albums. I can see that it is not processing anything as the cpu usage is 20% at most even though it shows sonic analysis is in progress . I have more than 50gb free and i dont have that folder in plugins suport/databases . Ive tried a few times to restart the process a few time but no luck

1 Like

It’ll kick off every night or after every scan ends, depending on the setting, and pick up where it left off.

If it’s taking up CPU then it’s working (maybe it’s “stuck” on a particularly large album?). Without logs it’s impossible to say what you’re running into.

Seems my problem was because of 2 dodgy tracks , Sonic Analysis has finished today after 3 weeks and is working. Thanx for the reply

1 Like

Glad to hear!

@elan I was thinking more along the lines if there is an easy way to redo everything from scratch - remove the current sonic analysis database fields and do a whole new scan.

But first I think I’ll wait for the new Plex server version with extended analysis logging and see where that takes me.

Thanks for responding!

@elan - I have upgraded server to version 1.24.5.5173. Are there any improvements in logging I can try in this version to see what goes wrong while building the indices?

Thanks in advance.

I believe most of the fixes will land in the next release, not that one.

1 Like

OK, I have installed version 1.25.0.5220-de6e61df7 now. Rebuilding indices now returns an error in the console like this:

Nov 14, 2021 15:09:56.655 [10712] Debug — [MusicAnalysis] Analyzing 0 albums in section 6.
Nov 14, 2021 15:09:56.655 [10712] Debug — [MusicAnalysis] Activity: updated activity 71c7b9b4-b87d-404d-926c-09b174f110b4 - completed 0.0% - Sonic Analysis
Nov 14, 2021 15:09:56.657 [1140] Debug — [MusicAnalysis] Fetching all analysis data from tracks from section 6.
Nov 14, 2021 15:09:56.657 [1140] Debug — [MusicAnalysis] Activity: updated activity 71c7b9b4-b87d-404d-926c-09b174f110b4 - completed 20.0% - Sonic Analysis
Nov 14, 2021 15:09:57.032 [12724] Debug — Request: [127.0.0.1:53810 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=2&metadataItemID=270002&metadataType=4&state=-1&parentID=-1&rootID=-1&mediaState=analyzing (19 live) GZIP Signed-in Token (martscape)
Nov 14, 2021 15:09:57.034 [9568] Debug — Completed: [127.0.0.1:53810] 200 GET /:/metadata/notify/changeItemState?librarySectionID=2&metadataItemID=270002&metadataType=4&state=-1&parentID=-1&rootID=-1&mediaState=analyzing (19 live) GZIP 2ms 195 bytes (pipelined: 1)
Nov 14, 2021 15:09:58.833 [4588] Debug — Media Analyzer: Background analysis completed in 3.5 seconds, removing 1 IDs
Nov 14, 2021 15:10:15.723 [1140] Debug — [MusicAnalysis] Building track index with 65314 tracks.
Nov 14, 2021 15:10:15.723 [1140] Debug — [MusicAnalysis] Activity: updated activity 71c7b9b4-b87d-404d-926c-09b174f110b4 - completed 40.0% - Sonic Analysis
Nov 14, 2021 15:10:15.725 [1140] Error — [MusicAnalysis] Building tree failed: Unable to open: Bad file descriptor (9).
Nov 14, 2021 15:10:15.725 [1140] Error — [MusicAnalysis] Building indexes failed.
Nov 14, 2021 15:10:15.727 [1140] Debug — [MusicAnalysis] Activity: Ended activity 71c7b9b4-b87d-404d-926c-09b174f110b4.
Nov 14, 2021 15:10:15.728 [1140] Debug — [MusicAnalysis] Indexes completed.
Nov 14, 2021 15:10:20.052 [9532] Debug — Loudness: Analysis of library section 6 completed.
Nov 14, 2021 15:11:00.792 [12136] Debug — Noting item as needing media analysis, scanning=0, streams=0, missing channels=0, streamability=0, size=0, time=1.

Unfortunately it is not very specific about which file or files has bad descriptors, so is there some way I can find that out?

Thanks in advance

@elan, can I bother - when you have the time - for a response to the above question? Thanks.

EDIT: Installed updated version 1.25.0.5246 but still the same error as above when rebuilding index.

hmm, errno 9 would seem to indicate it had trouble opening and index file or writing to it. those files live in the same directory as the database files, in a subdirectory named for the library ID. i’m not i have any idea of why it’s failing, perhaps you have some knowledge of your setup and permissions?