Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with artist image handling #2130

Closed
Tolriq opened this issue Jan 31, 2023 · 41 comments
Closed

Issue with artist image handling #2130

Tolriq opened this issue Jan 31, 2023 · 41 comments
Labels

Comments

@Tolriq
Copy link

Tolriq commented Jan 31, 2023

Description

Just updated to 0.49 and the new artist image handling is not "ideal"

First issue is that artists without image returns a default image, this is not really wanted as prevent clients to display a better default image that more match the theme of the application. On dark theme for example a large white icon does not look good at all.

Second issue is related so if first is fixed this one will be too, but now even the default image urls are different per artist, forcing the client to download and cache a possibly large amount of the same image for no purpose.

Expected Behaviour

  1. Identical image should report the same path for performance reason.

  2. Artist without image should return no image url or eventually return a well known ID so that client can display something else that better match the interface.

Steps to reproduce

Use the subsonic API search3 endpoint for artists.

Platform information

  • Navidrome version: 0.49
@Tolriq Tolriq added the bug label Jan 31, 2023
@deluan
Copy link
Member

deluan commented Jan 31, 2023

This is a chicken and egg issue: As a artist image can come from an external source (Spotify), I can only verify if the image is available after calling it. I cannot call Spotify for all artists beforehand or I could easily hit their rate limit.

The previous approach was to never return the artist's coverArt field, the only solution was to call getArtistInfo, and it would try to retrieve this info from external sources. If not available it would return the image url empty.

Now we have local images. The approach I took was to resolve any images at query time (not scan time), because of the external images limitation explained above. I understand it is not ideal, but This allows clients, specially those that request info on demand (ex: Airsonic Refix), to show artist images in their Artist list view.

I'll have to think of another approach for this, and suggestions are welcome.

@Tolriq
Copy link
Author

Tolriq commented Jan 31, 2023

What kind of headers do you return for those images (for the cache, max age, etag, ... support 304 code?)

In all cases having different urls might not be an issue if you do not return that generic image so that client can choose what missing image they want to display. Current solution just can't be detected on the client side.

IMO the normal way, would be to return 404 when no image and let the client decide what to do.

As a side note with your current change you might actually generate a tons more calls to the spotify API since before the client needed to call the proper endpoint or visit the artist page, now any client that display a grid of artist image will start multiple dozens of artist image request at the same time.

@deluan
Copy link
Member

deluan commented Jan 31, 2023

Are we talking about the getCoverArt endpoint or the url returned ingetArtistInfo response? My replies are assuming we are talking about the first one.

What kind of headers do you return for those images (for the cache, max age, etag, ... support 304 code?)

cache-control=public, max-age=315360000
last-modified=<timestamp from image or external service>

In all cases having different urls might not be an issue if you do not return that generic image so that client can choose what missing image they want to display. Current solution just can't be detected on the client side.

IMO the normal way, would be to return 404 when no image and let the client decide what to do.

I agree, but that's not what Subsonic/Airsonic does:

Screenshot 2023-01-31 at 10 52 52 AM

As a side note with your current change you might actually generate a tons more calls to the spotify API since before the client needed to call the proper endpoint or visit the artist page, now any client that display a grid of artist image will start multiple dozens of artist image request at the same time.

Yes, but some clients were already doing this for "pre-caching". But, initiating these calls from Navidrome, for all artists, would hit the rate limit way faster. I'm actually trying to pre-cache the images, but this is unreliable.

@Tolriq
Copy link
Author

Tolriq commented Jan 31, 2023

Since you now return artistImageUrl that's what I use so urls like
http://192.168.1.80:4533/roberto/share/img/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImFyLWZhZDFmYTIwYWYzMjc3NGU0NzgwZWM5ZDczMjVhMDI5IiwiaXNzIjoiTkQifQ.EJv7ByNKC5t6vIYGYEzBAeglO8rLiF6YXiNHD23FILU

Previously when those where not present I fallback to coverArt to generate the getCoverArt. But now you always give a value so it's always used.

I agree, but that's not what Subsonic/Airsonic does:

There's many thing they do not do correctly too ;)
But previously you did not return a value so there was no issue, now you return a value that is assumed to be valid and without a way to detect that it's not. Returning a default image on random queries is something, returning queries that are supposed to be valid by default but are not really is something else. So I do not see any reason to not use 404 for that use case that a different use case from getCoverArt. (Specially since you are using the /share url that is in the end not even a Subsonic endpoint so you are free to do as you like)

Yes, but some clients were already doing this for "pre-caching"

I do but with manners and delays. For the images you give me urls that are supposed to be valid and present so there's no throttling or anything, it will send multiple dozens of queries at the same time.
And since those urls are not the same as before, there's no cache anywhere to prevent that.

@deluan
Copy link
Member

deluan commented Jan 31, 2023

Since you now return artistImageUrl that's what I use so urls like
http://192.168.1.80:4533/roberto/share/img/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImFyLWZhZDFmYTIwYWYzMjc3NGU0NzgwZWM5ZDczMjVhMDI5IiwiaXNzIjoiTkQifQ.EJv7ByNKC5t6vIYGYEzBAeglO8rLiF6YXiNHD23FILU

Yeah, a third way to return artist images. So messy....

There's many thing they do not do correctly too ;)

Well, arguably, if we are implementing Subsonic compatible servers/clients, we should consider Subsonic the "golden standard".

But previously you did not return a value so there was no issue, now you return a value that is assumed to be valid and without a way to detect that it's not. Returning a default image on random queries is something, returning queries that are supposed to be valid by default but are not really is something else. So I do not see any reason to not use 404 for that use case that a different use case from getCoverArt. (Specially since you are using the /share url that is in the end not even a Subsonic endpoint so you are free to do as you like)

Good point. I just tried returning 404 in the /share/img artistImageUrls and all clients I tested it with handle this well and display their own image. So I will try to implement this today, in time for the bug fix release.

Yes, but some clients were already doing this for "pre-caching"

I do but with manners and delays.

It was not a criticism to Synfonium, just a general observation. Subtracks also does that and I think Substreamer as well. Actually, any player that shows a grid of artist images will try to request a lot of artist images in one go.

And since those urls are not the same as before, there's no cache anywhere to prevent that.

But this is a one time thing that will happen when upgrading. No way around it.

@Tolriq
Copy link
Author

Tolriq commented Jan 31, 2023

Well, arguably, if we are implementing Subsonic compatible servers/clients, we should consider Subsonic the "golden standard".

We already have quite a few discussions about that, just returning the type in the answer is breaking the Golden standard.
The API is the rule, what's not clearly defined is up to the server. The coverArt fields are optional so should not be returned when missing. What happens when you request random value is undefined at best. Not all servers do use al-XXXX for the artID either, some clients assume and try to call such cover including for the playlists. But this is all bad practice and reason why Subsonic API is currently very different between servers :(
(And BTW since it's soon February I'll restart the work on the API extension, seems we lost Ampache :()

For the rest, it's really more about your API keys, I just explain how Symfonium and probably other apps may trigger a lot more queries to the images than before and could be a problem. If it's not then all good. But as a large project you might have issues. (I don't know the Spotify API rules not using that one for the artist images).

Anyway, returning 404 would be nice and a quick working fix for this thanks. Just be aware that most apps will probably not cache the 404 code and will retry downloading the image at a possible frequent rate, so be sure to not trigger a Spotify API query each time.

@deluan
Copy link
Member

deluan commented Feb 1, 2023

Hey @Tolriq, can you please try the binary/docker image from this PR: #2134?

Let me know if that works better.

@Tolriq
Copy link
Author

Tolriq commented Feb 1, 2023

@deluan works for new artists never loaded, but for those that previously returned the default image it still return the default.

What should I clear, and can it be done automatically?

@deluan
Copy link
Member

deluan commented Feb 1, 2023

The image cache needs to be cleared, but there's no API call for that. I'll change the artist cache key format and this should resolve it automatically.

@Tolriq
Copy link
Author

Tolriq commented Feb 1, 2023

Perfect thanks.

@deluan
Copy link
Member

deluan commented Feb 1, 2023

Closed by #2134

@deluan deluan closed this as completed Feb 1, 2023
@Tolriq
Copy link
Author

Tolriq commented Feb 1, 2023

@deluan So after a full artistInfo2 to all the artists the error 404 each time takes quite some time to be sent.
I assume that it will do a last FM check each time and won't remember the no data as suggested before as a potential pitfalll.
Not sure how easy you could add some cache to avoid that.
On the same urls reported in OP.

@deluan
Copy link
Member

deluan commented Feb 1, 2023

/artistInfo2 itself has a cache of 24 hours. But the /stream/img does not rely on that info and has a cache of just 10 seconds. I had a reason for that, but just don't remember it right now. I'll see if I can change this.

@Tolriq
Copy link
Author

Tolriq commented Feb 1, 2023

That would be nice I have a 404 error cache to not retry indefinitely but only in memory, so dropped at each app start. I assume other apps don't even have such and would query each time.

deluan added a commit that referenced this issue Feb 2, 2023
@deluan
Copy link
Member

deluan commented Feb 2, 2023

Hey @Tolriq , can you try with the latest dev build? I also fixed some bugs that could affect the image cache and serve broken images.

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

@deluan Do you have a link to the built files? I use the windows exe for all my tests .

@deluan
Copy link
Member

deluan commented Feb 2, 2023

Here it is: https://nightly.link/navidrome/navidrome/workflows/pipeline/master

You can always get the latest binaries by clicking here:
Screenshot 2023-02-02 at 12 12 07 PM

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

@deluan ok so it works now, and seems fast to return the 404 after restart / clear cache.

Don't know if it's normal but after tons of scrolling now Navidrome shows tons of

time="2023-02-02T18:25:59+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:25:59+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=307626e70fbbed31b96072543be71667 name="Alice in Chains"

@deluan
Copy link
Member

deluan commented Feb 2, 2023

This message shows when it takes more than 5 seconds to get info from external sources. Maybe a slow connection?

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

2Gb fiber ;)

Probably more a deadlock, or too much at the same time and triggering a limit on last.fm?

I do not keep the logs on that test instance, is there a parameter on windows to to a file?

time="2023-02-02T18:26:47+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:47+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=fb505cbe73b8f09a96d105b63834a438 name="Ilkay Sencan/Dynoro"
time="2023-02-02T18:26:48+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:48+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=a80297e1af97931691d3be237b094204 name="Charlie Sexton"
time="2023-02-02T18:26:48+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:48+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=6c5d50e7e28bf5b4319fa47c58e0483a name=Esperanza
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=d78d8feafbb34f4b127dbb6973e3909c name="Bénabar"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=f6da1558744c9db94301af20daacb013 name="Alan Parsons Project"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=02766b3256130ecb210d9d87f82219bf name="Ed Sheeran"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=8d12dae805f46729a09bf0454a71adda name="Edith Piaf"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=46ea753987ffe403d013e4ec1bdade9f name="Eddie Murphy"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=bc106156a5e95fadadf5501216983032 name="Edu Lahmar"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=438ba9f86f49a56b87c5523b908d2491 name="Chevalier et Laspales"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=89a1916ed3c057a53189650957a26adb name="Alex Padden"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=01f3ca9fe962f2fe7a457005d2bb7f14 name=AllttA
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=b6edc2f98089601d6160f7093a513297 name="Basement Jaxx"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=ff2146edb4a29e8f52814863acc8fdce name="Afterlife feat. Dannii Minogue"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=f88c42b53d3b7bbce98d377459ed15ee name=Chevy
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=d7a0233bba33dfd8ac40c90a0e8825a7 name="Anson Seabra"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=64af0a69e32600b94746cf16d258109a name="Che Lan"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=ccb08dfbc22aa6da46413ca7bc68d0a5 name="Allem Iversom"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=9b75eb42d15f281f9532888f41f623c9 name="Amandine Bourgeois"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=60412dbf75f6246db2510eb54048a41e name="Almagamation Of Soundz"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=ebfbfd2de6aee1667c09e58b13bd897d name="Ana Johnsson"
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=1ac54e0577ee2471fe36a92ca7e9cfb1 name=Amanaska
time="2023-02-02T18:26:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=c4c621db89a4f977a86146a7303f023f name="Africando All Stars"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=aa1f2cbb4d6bf7163f19d2bfdd56cea8 name="Asaf Avidan"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=d5a5ca83f36b3bb6d201d4b1974b0b1a name=Alphaville
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=d7736a3b531f8fbf737ef6de4de6fa72 name="Alessandro Boschi"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=438ba9f86f49a56b87c5523b908d2491 name="Chevalier et Laspales"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=d154eb4c5c278e599f004af90623f791 name="A Man Called Adam With Eddie Parker"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=cd74bf82f8662ec0ce00566f3a295bd6 name="Anonymous 4"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=2a827e7187d16e0b59b1ccec89f59805 name="Annette Peacock"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=59ebdb4a34951a2e039a766c902a773c name="Ariana Grande"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=bd53433979df6aa65d274073e0834323 name=Axol
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=7f8c2515972ab8b316aad87a17920f84 name=Ambulo
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T18:26:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=49ec7df52557d8709c55333dd6b66abe name="A R Rehman"
time="2023-02-02T18:26:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"

@deluan
Copy link
Member

deluan commented Feb 2, 2023

Probably more a deadlock, or too much at the same time and triggering a limit on last.fm?

Not a deadlock, and a rate limit would show a different message. Not sure why you are getting so many messages like that. This is with the latest binary or it was like that before?

is there a parameter on windows to (log) to a file?

No, logs are always sent to STDOUT/ERR. If you run it on Windows as a service, you can check the logs: https://www.navidrome.org/docs/faq/#where-are-the-logs. If you run as a command, just try to do something like C:\> navidrome > log.txt

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

With the latest I do not think I saw that before, but did not really looked.

And there's a ton more of those. Just pasted a small extract.

For this test instance I use a open window to see the logs as they arrive when debugging.

Anyway not a big deal but I could have seen the original query time.

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

@deluan Ok so there's something wrong here :)

This is navidrome only killing a 13900K .... on fastscrolling artists.

image

You need to put some throttling in place or something :) It seems it tries again to rescrape all the artists.

@deluan
Copy link
Member

deluan commented Feb 2, 2023

There should be throttling in place. Default is 100/minute, maximum NumCPUs threads in parallel. Which client are you fast scrolling on? Synfonium? I thought it pre-cached the images....

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

The 100/min does not work for sure. And don't know what the thread do but even when compiling complex things I can't max out my CPU like this. Even if the 100 min is fixed, this is probably still a little too CPU aggressive.

Yes it's Symfonium, and no I do not pre cache the images without the option enabled. Since you now returns urls for all artists when scrolling it does triggers tons of requests, that what I tried to explain earlier, the new system will trigger more stuff.

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

Maybe your limits are only on the getcoverart and not the /share stuff.

@deluan
Copy link
Member

deluan commented Feb 2, 2023

The 100/min does not work for sure.

This means that ND will start refusing calls (429) if the number of queued requests gets up to 100 in the last minute.

Maybe your limits are only on the getcoverart and not the /share stuff.

Good catch! I'll fix that.

deluan added a commit that referenced this issue Feb 2, 2023
@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

Beware the limits should be on the sub calls to externals services not for returning the already cached images.
Else no one can load more than 100 images per minutes that's very low

@deluan
Copy link
Member

deluan commented Feb 2, 2023

Else no one can load more than 100 images per minutes that's very low

It is not 100 requests per minute. It means it enqueues requests up to 100 in a minute. If your hardware can handle more than that, it won't queue anything. See here for details: https://github.com/go-chi/chi/blob/master/middleware/throttle.go#L35

Anyway, these values are customizable, and the defaults work pretty well for my library of 1500 artists/75K songs, on an bellow average machine.

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

Still not working with last build I still kill my CPU and lag.

It takes like 2 or 3 seconds to go full CPU, still process thousands of queries (Most calls are cancelled by Symfonium, but I guess the call is not cancelled internally by Navidrome after).

I got a few

time="2023-02-02T20:29:43+01:00" level=error msg="Error calling LastFM/artist.getInfo" artist="Johnny Clegg & Savuka" error="last.fm error(29): Rate Limit Exceeded - This application has made too many requests in a short period. If this is your API key, see https://www.last.fm/api/tos#4.4 for information about raising the limit." mbid=
time="2023-02-02T20:29:43+01:00" level=error msg="Error calling LastFM/artist.getInfo" artist="Johnny Clegg & Savuka" error="last.fm error(29): Rate Limit Exceeded - This application has made too many requests in a short period. If this is your API key, see https://www.last.fm/api/tos#4.4 for information about raising the limit." mbid=
time="2023-02-02T20:29:43+01:00" level=error msg="Error calling LastFM/artist.getInfo" artist="Johnny Clegg & Savuka" error="last.fm error(29): Rate Limit Exceeded - This application has made too many requests in a short period. If this is your API key, see https://www.last.fm/api/tos#4.4 for information about raising the limit." mbid=

Then after a while I got hundreds of

time="2023-02-02T20:33:24+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=58e50f904aab05ac687efc1635421d78 name=Eagles
time="2023-02-02T20:33:24+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T20:33:24+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=35fb9e931a13818ba3c3129beaef0b49 name=Garmiani
time="2023-02-02T20:33:24+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"

Then after a long time it settles down.

And I've checked the metadata from the tested build says commit bcab3cc

@deluan
Copy link
Member

deluan commented Feb 2, 2023

Can you try customizing the throttler? Options are:

  • DevArtworkMaxRequests - max requests to process in parallel
  • DevArtworkThrottleBacklogLimit - Maximum requests enqueued. More than that will be dropped (return 429)
  • DevArtworkThrottleBacklogTimeout - Requests older than this will be dropped (return 429)

Try reducing the MaxRequests to 2 (default now is numcores/3, in tour case 8)

Most calls are cancelled by Symfonium, but I guess the call is not cancelled internally by Navidrome after

Calls canceled by the client should not use much resources before being discarded. But I just pushed a change to be sure it is discarded immediately without further processing.

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

Quickly tried to change the value this does not seem to change anything. (Not with the last one as the binaries where not up to date).

DevArtworkMaxRequests = 2
DevArtworkThrottleBacklogLimit = 50
DevArtworkThrottleBacklogTimeout = 1

While it lags most images are still working and there's some rare error 429.

But CPU seems really maxed trying to do stuff with lastFM. Still gives hundreds of

time="2023-02-02T21:27:16+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-02T21:27:16+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=30a426ef29c4be53e43307dd9351f251 name="Kim Carnes"

The second they stop, the CPU goes down to 0.

Rescrolling again directly restart the full CPU and the errors. Seems the 24h cache is not working for the failures maybe?

Fun to see the CPU like that
image

That's a good temp check :)

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

When I just scroll a little on new part CPU goes to 100% and block all also but before it start to use all CPU I got some

time="2023-02-02T21:35:14+01:00" level=debug msg="Got Biography" agent=lastfm artist="Paul Buckmaster" elapsed=165.7ms len=564
time="2023-02-02T21:35:14+01:00" level=debug msg="Got External Url" agent=lastfm artist="Paul Buckmaster" elapsed=165.7ms url="https://www.last.fm/music/Paul+Buckmaster"
time="2023-02-02T21:35:14+01:00" level=debug msg="Got Biography" agent=lastfm artist="Paul Daley" elapsed=164.4ms len=72
time="2023-02-02T21:35:14+01:00" level=debug msg="Got External Url" agent=lastfm artist="Paul Daley" elapsed=164.4ms url="https://www.last.fm/music/Paul+Daley"
time="2023-02-02T21:35:14+01:00" level=warning msg="Artist not found in Spotify" artist="Patrick Swayze"
time="2023-02-02T21:35:14+01:00" level=debug msg="Got Biography" agent=lastfm artist="Patrick Swayze" elapsed=137.1ms len=581
time="2023-02-02T21:35:14+01:00" level=debug msg="Got External Url" agent=lastfm artist="Patrick Swayze" elapsed=137.1ms url="https://www.last.fm/music/Patrick+Swayze"
time="2023-02-02T21:35:14+01:00" level=debug msg="Got Similar Artists" agent=lastfm artist="Paul Mc Cartney" elapsed=340.3ms similarReceived=100
time="2023-02-02T21:35:14+01:00" level=debug msg="Got Similar Artists" agent=lastfm artist="Pompom Finkelstein" elapsed=1.76s similarReceived=100
time="2023-02-02T21:35:15+01:00" level=debug msg="Got Similar Artists" agent=lastfm artist="Paul McCartney & Wings" elapsed=584.8ms similarReceived=99
time="2023-02-02T21:35:15+01:00" level=debug msg="Got Biography" agent=lastfm artist="Patrick Sebastien" elapsed=0s len=198

So now my educated guess would be that the issue is not about the fetching of the data and returning the image but what Navidrome does when it receive the data back.
Don't know what you do with those 100 similar artists received but if you generate tons of db calls to try to match everything it could be a killer if you have tons of that running at the same time.
Depending on how you handle that data back, maybe it should be delegate to another worker pool with a limit of handling 1 simultaneous artist similar / biography update?
Issue could be lock on the database and the app trying to hard to retry the connection without enough delay to let the CPU alone.
Or many other things, but I think the issue is more there than where we are looking at now.

All that when the client just request an image.

Edit: When just scrolling a little to trigger enough last.fm scrape to go 100% but not scrolling a lot I do not get any
msg="ArtistInfo update canceled" error="context deadline exceeded" so that deadline issue is caused by the 100% cpu, either my high end CPU is really at more than 100% and can't do the http request in 5 seconds or there's a lock somewhere.

@deluan
Copy link
Member

deluan commented Feb 2, 2023

Don't know what you do with those 100 similar artists received but if you generate tons of db calls to try to match everything it could be a killer if you have tons of that running at the same time.

Yeah, that's it. Reason why you should not work too late at night :P. But anyway, it is currently hard to decouple the similar (and top songs) matching from the external metadata lookups, currently it is one or nothing :/ I'll try to come up with something.

By the way, DevArtworkThrottleBacklogTimeout = 1 means 1 nanosecond! This parameter is a duration (string) and should be "1m" or "30s".

I just checked and if DevArtworkMaxRequests is > 0 throttling will be configured. But the issue seems to be the similar artists AND top songs matching. Good catch!

EDIT: Top Songs is not done at the same time.

EDIT 2: If DevArtworkMaxRequests = 2, you should not max out your cores, it should only use 2.... I'll put more logs in place to be sure the params are being read correctly.

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

Can't you just delegate the actual job of handling the update from the external data to another job with queuing?

You still get the data at the same time, but the handling of the data is handled in two parts.

I think go have the same concept as coroutines so should be relatively easy no.
If you want to limit memory usage and easier duplicate handling then you queue that received data in a db table with a runner to handle it.

Edit for your edit2. The art may be limited to 2 cores, but the data processing of the similar artist might support many threads.

@deluan
Copy link
Member

deluan commented Feb 2, 2023

Edit for your edit2. The art may be limited to 2 cores, but the data processing of the similar artist might support many threads.

It does not, for sure.

I think go have the same concept as coroutines so should be relatively easy no.

Yes, there's a lot of goroutines and concurrency happening in Navidrome, ex: when pre-caching new added albums/artists, the scanner is parallelized, searchs for artist/album/mediafiles run in parallel, and so on.

Can't you just delegate the actual job of handling the update from the external data to another job with queuing?

Sure I can, but that requires a bunch of refactoring. I was thinking of having each piece of external metadata to have its own cache expiration (currently it's only one for all), so they could be queried independently. But that also requires a lot of refactoring.... As I said, I'll figure it out

EDIT:

You still get the data at the same time, but the handling of the data is handled in two parts.

But I wouldn't be able to return the Similar Songs if I don't do the matching first. The main problem seams the matching that is really intensive, with lots of LIKE queries.

@Tolriq
Copy link
Author

Tolriq commented Feb 2, 2023

Is there a parameter to increase the 24h cache for last FM for artist?
Else I'll have the issue often as I do tons of tests currently requiring cache clear on Symfonium side.

@deluan
Copy link
Member

deluan commented Feb 2, 2023

It is hardcoded for now, but I can make it a config option.

@deluan
Copy link
Member

deluan commented Feb 2, 2023

I added two new config options:

  • DevArtistInfoTimeToLive, default = "24h"
  • DevAlbumInfoTimeToLive, default = "168h" (7 days)

I also added logs around the similar artists mapping function, so it should show now how long it takes for each call. Look for debug messages Mapped Similar Artists.

@Tolriq
Copy link
Author

Tolriq commented Feb 3, 2023

Ok so :

time="2023-02-03T09:55:48+01:00" level=debug msg="Found expired cached ArtistInfo, refreshing in the background" name="Beady Belle" updatedAt="2023-02-01 14:59:14.2538938 +0000 UTC"
time="2023-02-03T09:55:48+01:00" level=debug msg="Got Images" agent=spotify artist="Beady Belle" elapsed=78.4ms images="[{https://i.scdn.co/image/844a8db4eb8ad216b51d650d8227dd2aea9cc531 1000} {https://i.scdn.co/image/6752ae3c66993de022137c1f2cea2cc8a60661a5 640} {https://i.scdn.co/image/065d653be1784ef305e6da63cec2a7cc654f8a76 200} {https://i.scdn.co/image/d668c639a46336a259fee992d97d1da9148256d8 64}]"
time="2023-02-03T09:55:48+01:00" level=debug msg="Got Biography" agent=lastfm artist="Beady Belle" elapsed=155.3ms len=620
time="2023-02-03T09:55:48+01:00" level=debug msg="Got External Url" agent=lastfm artist="Beady Belle" elapsed=155.3ms url="https://www.last.fm/music/Beady+Belle"
time="2023-02-03T09:55:48+01:00" level=debug msg="Got Similar Artists" agent=lastfm artist="Beady Belle" elapsed=295.7ms similarReceived=100
time="2023-02-03T09:56:32+01:00" level=debug msg="Mapped Similar Artists" Beady Belle=numSimilar agent=artist

Then it follows will all the others:

time="2023-02-03T09:56:32+01:00" level=debug msg="Mapped Similar Artists" Beady Belle=numSimilar agent=artist
time="2023-02-03T09:56:34+01:00" level=debug msg="Mapped Similar Artists" Bedlam=numSimilar agent=artist
time="2023-02-03T09:56:34+01:00" level=debug msg="Mapped Similar Artists" Basada=numSimilar agent=artist
time="2023-02-03T09:56:35+01:00" level=debug msg="Mapped Similar Artists" Bcalm=numSimilar agent=artist
time="2023-02-03T09:56:38+01:00" level=debug msg="Mapped Similar Artists" Besomorph=numSimilar agent=artist
time="2023-02-03T09:56:38+01:00" level=debug msg="Mapped Similar Artists" Berurier Noir=numSimilar agent=artist
time="2023-02-03T09:56:38+01:00" level=debug msg="Mapped Similar Artists" Björk=numSimilar agent=artist
time="2023-02-03T09:56:39+01:00" level=debug msg="Mapped Similar Artists" Bob Marley & the Wailers=numSimilar agent=artist
time="2023-02-03T09:56:39+01:00" level=debug msg="Mapped Similar Artists" Blue Foundation=numSimilar agent=artist
time="2023-02-03T09:56:39+01:00" level=debug msg="Mapped Similar Artists" Bob Belden & Holly Cole=numSimilar agent=artist
time="2023-02-03T09:56:39+01:00" level=debug msg="Mapped Similar Artists" Blaze U=numSimilar agent=artist
time="2023-02-03T09:56:39+01:00" level=debug msg="Mapped Similar Artists" Boomkat=numSimilar agent=artist
time="2023-02-03T09:56:39+01:00" level=debug msg="Mapped Similar Artists" Bratisla Boys=numSimilar agent=artist
time="2023-02-03T09:56:39+01:00" level=debug msg="Mapped Similar Artists" Break Machine=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Brian May=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Black=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Bert=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Caecilie Norby=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Billy Haley and His Comets=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Calcanhotto, Adriana=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Camila Cabello/Ed Sheeran=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Casiio/Sleepermane=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Chet Atkins & Mark Knopfler=numSimilar agent=artist
time="2023-02-03T09:56:40+01:00" level=debug msg="Mapped Similar Artists" Catalani=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" Bikram Ghosh=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" The Clash=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" Cities Of Foam=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" CID=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" Cinematic Orchestra (The)=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" Billie Holiday=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" Claude Challe & Carlos Campos=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" Bhxa=numSimilar agent=artist
time="2023-02-03T09:56:41+01:00" level=debug msg="Mapped Similar Artists" Billie Eilish=numSimilar agent=artist
time="2023-02-03T09:56:42+01:00" level=debug msg="Mapped Similar Artists" Camino Del Sol=numSimilar agent=artist
time="2023-02-03T09:56:42+01:00" level=debug msg="Mapped Similar Artists" Black Cat Bones=numSimilar agent=artist
time="2023-02-03T09:56:42+01:00" level=debug msg="Mapped Similar Artists" Billy Preston=numSimilar agent=artist
time="2023-02-03T09:56:42+01:00" level=debug msg="Mapped Similar Artists" Brad Mehldau=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" Bread=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" Buffalo Sanchez=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" Buggles=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" The Buzzcocks=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" Bullet Boys=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" Burhan Ocal=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" C.Jerome=numSimilar agent=artist
time="2023-02-03T09:56:43+01:00" level=debug msg="Mapped Similar Artists" C. Armstrong, M. De Vries and N. Hooper=numSimilar agent=artist
time="2023-02-03T09:56:44+01:00" level=debug msg="Mapped Similar Artists" Calvin Harris/Dua Lipa=numSimilar agent=artist
time="2023-02-03T09:56:44+01:00" level=debug msg="Mapped Similar Artists" Chevalier et Laspales=numSimilar agent=artist
time="2023-02-03T09:56:44+01:00" level=debug msg="Mapped Similar Artists" Cicada=numSimilar agent=artist
time="2023-02-03T09:56:44+01:00" level=debug msg="Mapped Similar Artists" Cinderella=numSimilar agent=artist
time="2023-02-03T09:56:44+01:00" level=debug msg="Mapped Similar Artists" Chuck Berry=numSimilar agent=artist
time="2023-02-03T09:56:44+01:00" level=debug msg="Mapped Similar Artists" Cirque Du Soleil=numSimilar agent=artist
time="2023-02-03T09:56:45+01:00" level=debug msg="Mapped Similar Artists" The Chrystals=numSimilar agent=artist
time="2023-02-03T09:56:45+01:00" level=debug msg="Mapped Similar Artists" Citizen Cope=numSimilar agent=artist
time="2023-02-03T09:56:45+01:00" level=debug msg="Mapped Similar Artists" Class of '99=numSimilar agent=artist
time="2023-02-03T09:56:46+01:00" level=debug msg="Mapped Similar Artists" Baul Dimension=numSimilar agent=artist
time="2023-02-03T09:56:47+01:00" level=debug msg="Mapped Similar Artists" Ben Harper & The Innocent Criminals=numSimilar agent=artist
time="2023-02-03T09:56:48+01:00" level=debug msg="Mapped Similar Artists" Benabar=numSimilar agent=artist
time="2023-02-03T09:56:48+01:00" level=debug msg="Mapped Similar Artists" Bernard Vereecke=numSimilar agent=artist
time="2023-02-03T09:56:48+01:00" level=debug msg="Mapped Similar Artists" C. Jérome=numSimilar agent=artist
time="2023-02-03T09:56:48+01:00" level=debug msg="Mapped Similar Artists" Berywam=numSimilar agent=artist
time="2023-02-03T09:56:48+01:00" level=debug msg="Mapped Similar Artists" Big Soul=numSimilar agent=artist
time="2023-02-03T09:56:48+01:00" level=debug msg="Mapped Similar Artists" Bill Haley and the Comets=numSimilar agent=artist
time="2023-02-03T09:56:49+01:00" level=debug msg="Mapped Similar Artists" Brian Eno=numSimilar agent=artist
time="2023-02-03T09:56:49+01:00" level=debug msg="Mapped Similar Artists" Billy Joel=numSimilar agent=artist
time="2023-02-03T09:56:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=79a3d73b17c768481540d0d870c2c98b name="Billy Joel"
time="2023-02-03T09:56:49+01:00" level=debug msg="Mapped Similar Artists" Boonz=numSimilar agent=artist
time="2023-02-03T09:56:49+01:00" level=debug msg="Mapped Similar Artists" Blazars=numSimilar agent=artist
time="2023-02-03T09:56:49+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:49+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=59b28bee8316eaec864c05862fe4de00 name=Blazars
time="2023-02-03T09:56:49+01:00" level=debug msg="Mapped Similar Artists" Boris=numSimilar agent=artist
time="2023-02-03T09:56:50+01:00" level=debug msg="Mapped Similar Artists" The Brian Setzer Orchestra=numSimilar agent=artist
time="2023-02-03T09:56:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=2d0cb13ef7056b177632dbb2b914a7ec name="The Brian Setzer Orchestra"
time="2023-02-03T09:56:50+01:00" level=debug msg="Mapped Similar Artists" Casiio=numSimilar agent=artist
time="2023-02-03T09:56:50+01:00" level=debug msg="Mapped Similar Artists" Burak Yeter/Danelle Sandoval=numSimilar agent=artist
time="2023-02-03T09:56:50+01:00" level=debug msg="Mapped Similar Artists" Bulgarian Womens Choir=numSimilar agent=artist
time="2023-02-03T09:56:50+01:00" level=debug msg="Mapped Similar Artists" Brigitte Bardot=numSimilar agent=artist
time="2023-02-03T09:56:50+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:50+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=14381e1dca802cde0f634b0ea0173576 name="Brigitte Bardot"
time="2023-02-03T09:56:50+01:00" level=debug msg="Mapped Similar Artists" Celine Dion=numSimilar agent=artist
time="2023-02-03T09:56:51+01:00" level=debug msg="Mapped Similar Artists" Chanticleer=numSimilar agent=artist
time="2023-02-03T09:56:51+01:00" level=debug msg="Mapped Similar Artists" Centory=numSimilar agent=artist
time="2023-02-03T09:56:51+01:00" level=debug msg="Mapped Similar Artists" Chemical Brothers=numSimilar agent=artist
time="2023-02-03T09:56:51+01:00" level=debug msg="Mapped Similar Artists" Chantal Kreviazuk=numSimilar agent=artist
time="2023-02-03T09:56:51+01:00" level=debug msg="Mapped Similar Artists" Century Lover=numSimilar agent=artist
time="2023-02-03T09:56:51+01:00" level=debug msg="Mapped Similar Artists" Charlie Puth/Kehlani=numSimilar agent=artist
time="2023-02-03T09:56:51+01:00" level=debug msg="Mapped Similar Artists" Chris Issak=numSimilar agent=artist
time="2023-02-03T09:56:52+01:00" level=debug msg="Mapped Similar Artists" Bart & Baker=numSimilar agent=artist
time="2023-02-03T09:56:52+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:52+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=925e659d21686a919263c6fc85840edf name="Bart & Baker"
time="2023-02-03T09:56:52+01:00" level=debug msg="Mapped Similar Artists" Beach Boys=numSimilar agent=artist
time="2023-02-03T09:56:52+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:52+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=ad3681d67e96dba5cc3913a1cb0ba875 name="Beach Boys"
time="2023-02-03T09:56:54+01:00" level=debug msg="Mapped Similar Artists" Ben l'Oncle Soul=numSimilar agent=artist
time="2023-02-03T09:56:54+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:54+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=a3efc5ef3d29d4ee06d347b2b39bec04 name="Ben l'Oncle Soul"
time="2023-02-03T09:56:54+01:00" level=debug msg="Mapped Similar Artists" Beth Orton=numSimilar agent=artist
time="2023-02-03T09:56:54+01:00" level=warning msg="ArtistInfo update canceled" error="context deadline exceeded"
time="2023-02-03T09:56:54+01:00" level=error msg="Error refreshing ArtistInfo" error="context deadline exceeded" id=2ac7cc13156691aadc9bb8282b2cd518 name="Beth Orton"
time="2023-02-03T09:56:54+01:00" level=debug msg="Mapped Similar Artists" Biber=numSimilar agent=artist

So nearly 1 minutes at full CPU before the first mapping then the others do follow, this really looks like some deadlock with all of them racing to do something.

This test instance have 27K songs / 4516 artists
Cpu 13900K Ssd: Samsung 990 Pro 2To and tons of DD5 memory, this is a beast machine that should not have such issue handle this.

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants