Jump to content

Scan Media Library taking much too long, many errors logged


jwill

Recommended Posts

Windows Version 3.0.5424.1

 

Last time I checked (which was many weeks ago), Scan Media Library would take under a minute to run.

 

Now, even though I have not added a great deal of new content, I find that Scan Media Library takes 10 to 20 minutes to run, every time. And hundreds of errors like this are logged:

2014-11-08 18:32:29.2437 Debug - App: Running FanartMovieImageProvider for \\NORM\r2c3\movies\Dreamscape (1984)\Dreamscape.mkv
2014-11-08 18:32:29.2437 Info - App: HttpClientManager GET: http://webservice.fanart.tv/v3/movies/24099?api_key=5c6b04c68e904cfed1e6cbc9a9e683d4
2014-11-08 18:32:32.8579 Error - App: Error getting response from http://webservice.fanart.tv/v3/movies/24099?api_key=5c6b04c68e904cfed1e6cbc9a9e683d4
    The remote server returned an error: (404) Not Found.
    System.Net.WebException
     at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
     at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

and several errors like this are logged:

2014-11-08 18:37:17.3831 Error - ProviderManager: MovieDbImageProvider failed in GetImageInfos for type Movie
    The remote server returned an error: (404) Not Found.
    MediaBrowser.Model.Net.HttpException
     at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsyncInternal>d__1e.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsync>d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.<Get>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at MediaBrowser.Providers.Movies.MovieDbProvider.<FetchMainResult>d__1d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at MediaBrowser.Providers.Movies.MovieDbProvider.<DownloadMovieInfo>d__11.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at MediaBrowser.Providers.Movies.MovieDbImageProvider.<FetchImages>d__1b.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at MediaBrowser.Providers.Movies.MovieDbImageProvider.<GetImages>d__f.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at MediaBrowser.Providers.Manager.ProviderManager.<GetImages>d__23.MoveNext()
    InnerException: System.Net.WebException
    The remote server returned an error: (404) Not Found.
     at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
     at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

Here is everything logged during a recent Scan Media Library run:

 

http://pastebin.com/PC5HVUxV

 

 
Link to comment
Share on other sites

Angelblue05

Are you accessing your server using app.mediabrowser.tv? I think I had the same error earlier. I wasn't able to start my library scan or modify metadata from there. I was able to, when accessing my account locally (old method/server IP). I'm guessing it's some security measure.

Link to comment
Share on other sites

Are you accessing your server using app.mediabrowser.tv? I think I had the same error earlier. I wasn't able to start my library scan or modify metadata from there. I was able to, when accessing my account locally (old method/server IP). I'm guessing it's some security measure.

 

No, I am using the web interface. But I do not think that is relevant to the problem, since the Scan starts and finishes -- the problem is during the scan.

Link to comment
Share on other sites

By the way, I noticed from the server logs that this problem has been going on for several days. So it is not just a problem with a website being down for a short while. I also suspect I would have noticed this problem if it had been going on for more than 2 or 3 weeks, so I suspect it is related to a MBS update in the last several weeks.

 

Can anyone explain the errors I am seeing in the logs?

Link to comment
Share on other sites

I'm sure it is related to us moving to the new version of their API.  We'll have to see if it is actually a problem on their end or if we need to handle the situation differently.

Link to comment
Share on other sites

You could always just temporarily disable the fanart provider for Movies.

 

Thanks for the suggestion! Done, and now my scans are back under a minute again.

 

Do you think most people have fanart disabled for movies? I thought my setup was fairly mainstream, but if so, I would have expected to see a lot of people having this problem. So I guess there is something unusual about my setup or configuration.

Link to comment
Share on other sites

Beardyname

Thanks for the suggestion! Done, and now my scans are back under a minute again.

 

Do you think most people have fanart disabled for movies? I thought my setup was fairly mainstream, but if so, I would have expected to see a lot of people having this problem. So I guess there is something unusual about my setup or configuration.

 

I'm using fanart, only difference is it's my 2nd or 3rd provider. My scans are quick as usual. (faster connection maybe?)

Link to comment
Share on other sites

I'm using fanart, only difference is it's my 2nd or 3rd provider. My scans are quick as usual. (faster connection maybe?)

 

I was looking at the error logs again, and I think it is when MBS tries to use fanart with a TMDBID number. Since I use the tmdbid= field in hundreds of my movies (and I suspect most people rarely use that field), I am guessing that the fanart error only occurs when MBS looks up something with the ID number. I have a few TV shows with tvdbid defined also, and it seems to have a similar problem with fanart.

Link to comment
Share on other sites

I've got around 1500 movies, almost all have TMDB IDs set in the metadata.

210 TV series with 11,000 episodes, almost all have TVDB IDs.

No music in my MB collection.

I'm on a 3Mb connection, which is fairly slow. I just ran a scan and it took about 15 seconds.

 

I DO have fanart.tv enabled as an image provider for movies, series, seasons, and collections. It is always the second one in the order of providers (behind tmdb or tvdb).

 

I DO NOT have any automatic updates turned on (Dashboard > Metadata > Advanced > Automatic Updates).

 

When I add new media to my collection, the scan can be significantly slower. That is probably because of my crappy home connection.

 

 

Just providing a comparison for you that might help narrow down your issue, hope it helps.

Link to comment
Share on other sites

CashMoney

I've just been called in by a customer for something unrelated, but I did spend about an hour trying to make his library scan faster as in the past few days it's been really slow. I couldn't see an issue at the time, but I promised to look into it. Will have to wait till I go there again, but I'll also try disabling the fanart provider and see if that helps; since I checked everything else over (defrag, extra unneeded small files in media folders, background apps, network/internet issues, etc) I'd bet disabling fanart would cure his problem too.

Link to comment
Share on other sites

After a few more runs of Scan Media Library, I found that disabling fanart on movies was not enough. It helped, but I was still sometimes getting scans that took several minutes.

 

So I disabled fanart for everything (movies, series, episodes, etc.) and also disabled fanart under metadata / advanced / automatic updates.

 

Now all my scans are consistently within a few seconds of 20 seconds. So it seems that the new way MBS is accessing fanart is the culprit. Until MBS gets fixed, the trick seems to be just finding and unchecking all instances of fanart.

  • Like 1
Link to comment
Share on other sites

CashMoney

@@jwill

 

Agreed. I've just checked my own server, just in case. Scan completes so not bothered to check until now. Last scan took over 5 minutes. I scanned again, just over 2 minutes. Disabled all fanart in metadata, less than 30 seconds.

Link to comment
Share on other sites

Hi,

 

I have noticed the same. fanart.tv seems to be the culprit. I put in a feature request to change it to a separate task, until it gets sorted out.

Link to comment
Share on other sites

After a few more runs of Scan Media Library, I found that disabling fanart on movies was not enough. It helped, but I was still sometimes getting scans that took several minutes.

 

So I disabled fanart for everything (movies, series, episodes, etc.) and also disabled fanart under metadata / advanced / automatic updates.

 

Now all my scans are consistently within a few seconds of 20 seconds. So it seems that the new way MBS is accessing fanart is the culprit. Until MBS gets fixed, the trick seems to be just finding and unchecking all instances of fanart.

 

Would you mind trying it with just automatic updates disabled, re-enabling the fanart provider for everything else?

Link to comment
Share on other sites

Happy2Play

Mine took 17 seconds with automatic updates from fanart.tv disabled and 25 minute with it enabled.  Seem reasonable to me.

 

2251 Movies

175 TV series

Edited by Happy2Play
Link to comment
Share on other sites

Would you mind trying it with just automatic updates disabled, re-enabling the fanart provider for everything else?

 

With no new content, I tried it three ways:

 

15 sec : all fanart off

15 sec : enabled fanart for movies, collections, series, seasons ; disabled fanart for auto updates

long time (stopped it after 10min) : enabled fanart for auto updates; enabled fanart for movies, collections, series, seasons

 

So it seems that when there is no new content, disabling fanart for auto updates is the key configuration setting.

 

But if I had new movie or TV content, I assume the other settings will make a difference of at least the timeout length MBS uses for fanart.

Link to comment
Share on other sites

But if I had new movie or TV content, I assume the other settings will make a difference of at least the timeout length MBS uses for fanart.

 

Not if the priority for FanArt was low and the images were found elsewhere first.

Link to comment
Share on other sites

pgriffith

I've had the same issue here as well.

 

My Collection is 2663 movies and 13,600 TV episodes (324 series)

 

Library scan was taking about 45 minutes. Turned off Fanart under Automatic updates and now my scan time is down to about 1 minute.

 

Has been annoying me for awhile now, thanks for the heads up.

Link to comment
Share on other sites

  • 2 weeks later...

My library scan takes also forever since a few days. It get's stuck at 23% and one hour later it's 23.1%

About a week ago I added my pretty large game collection to the library but after that it didn't take this long as since yesterday.

The new server update that I installed yesterday didn't help and turning off several fanart etc. either.

Perhaps the log provides some information about the cause?

 

Log

Link to comment
Share on other sites

My problem was my 30 gb mame collection that was causing the huge delay. Removed it from my library and the scan time is now back to normal.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...