Jump to content

Extremely slow loading


echoxxzz

Recommended Posts

echoxxzz

I decided to give Emby a go on my Synology NAS DS418play but it's extremely slow at times. I notice this is worse when the server is first started (which takes almost 2 minutes) and after it hasn't been used for awhile. If I use the browser it takes more than a minute to refresh the home page for example. Once it does load it works fine and it's just as quick as my old Windows server until I let is sit idle for awhile.

 

I enabled debug logging and whenever this happens I noticed there is a corresponding slow sql select statement in the logs.

 

2020-04-21 00:01:27.669 Debug SqliteItemRepository: GetItemList query time (slow): 101995ms. Query: select A.type,A.data,A.Id,A.IsMovie,A.IsSeries,A.IsRepeat,A.IndexNumber,A.Name,A.ParentIndexNumber,A.ProductionYear,A.RunTimeTicks,A.guid,A.ParentId,A.Tags,A.IsVirtualItem,A.SeriesName,A.Album,A.AlbumId,A.SeriesId,A.PresentationUniqueKey,A.ProviderIds,A.Images,A.AlbumArtists,A.ExternalId,A.SeriesPresentationUniqueKey,UserDatas.Rating,UserDatas.IsFavorite,UserDatas.Played,UserDatas.PlayCount,UserDatas.PlaybackPositionTicks,UserDatas.LastPlayedDateInt,UserDatas.AudioStreamIndex,UserDatas.SubtitleStreamIndex from MediaItems A join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where UserDatas.playbackPositionTicks > 0 AND IsVirtualItem=@IsVirtualItem AND MediaType=@MediaTypes AND TopParentId in (98991,143564,428320,428380,144494,430056,574615,578325,587445,669222,4,121831) Group by PresentationUniqueKey ORDER BY UserDatas.LastPlayedDateInt DESC LIMIT 12
2020-04-21 00:01:30.030 Debug SqliteItemRepository: GetItemList query time (slow): 1774ms. Query: select A.type,A.data,A.Id,A.EndDate,A.IsMovie,A.IsSeries,A.IsRepeat,A.IndexNumber,A.Name,A.ParentIndexNumber,A.ProductionYear,A.RunTimeTicks,A.guid,A.ParentId,A.Tags,A.IsVirtualItem,A.SeriesName,A.Album,A.AlbumId,A.SeriesId,A.PresentationUniqueKey,A.ProviderIds,A.Images,A.AlbumArtists,A.ExternalId,A.SeriesPresentationUniqueKey,A.Status,UserDatas.Rating,UserDatas.IsFavorite,UserDatas.Played,UserDatas.PlayCount,UserDatas.PlaybackPositionTicks,UserDatas.LastPlayedDateInt,UserDatas.AudioStreamIndex,UserDatas.SubtitleStreamIndex from MediaItems A left join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where IsFolder=@IsFolder AND IsVirtualItem=@IsVirtualItem AND MediaType=@MediaTypes AND TopParentId in (430056,574615,578325,587445,669222) Group by AlbumId ORDER BY MAX(DateCreated) DESC LIMIT 30

 

My NAS is literally doing nothing. CPU usage is 1%, memory is 20% and HDD hibernation is disabled but 101995ms (~1.6 minutes) is a bit long for a sql select to finish.

I should mention that my library is pretty big (mostly from music files) and that my library.db file is almost 1G in size.

It's about the same size as on my old Windows server and it was never slow.

embyserver.txt

Link to comment
Share on other sites

processcreative

This is happening for me also, the interface just hangs for 30-60 seconds, happens on Emby for Roku, Fire TV and Android Mobile. Only started happening since 4.4.2.

 

Running on a Synology 718 with 10GB RAM.

Link to comment
Share on other sites

Please try removing the cover art plugin, then restarting the server and see if that helps. thanks.

Link to comment
Share on other sites

echoxxzz

No luck. I let Emby sit for awhile and when I clicked to go back to the home page it took a very, very long time and the slow sql select debug messsages showed up in the log again:

 

2020-04-21 18:55:03.201 Debug SqliteItemRepository: GetItemList query time (slow): 3614ms. Query: select A.type,A.data,A.Id,A.IsMovie,A.IsSeries,A.IsRepeat,A.IndexNumber,A.Name,A.ParentIndexNumber,A.ProductionYear,A.RunTimeTicks,A.guid,A.ParentId,A.Tags,A.IsVirtualItem,A.SeriesName,A.Album,A.AlbumId,A.SeriesId,A.PresentationUniqueKey,A.ProviderIds,A.Images,A.AlbumArtists,A.ExternalId,A.SeriesPresentationUniqueKey,UserDatas.Rating,UserDatas.IsFavorite,UserDatas.Played,UserDatas.PlayCount,UserDatas.PlaybackPositionTicks,UserDatas.LastPlayedDateInt,UserDatas.AudioStreamIndex,UserDatas.SubtitleStreamIndex from MediaItems A join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where UserDatas.playbackPositionTicks > 0 AND IsVirtualItem=@IsVirtualItem AND MediaType=@MediaTypes AND TopParentId in (98991,143564,428320,428380,144494,430056,574615,578325,587445,669222,4,121831) Group by PresentationUniqueKey ORDER BY UserDatas.LastPlayedDateInt DESC LIMIT 12

Edited by echoxxzz
Link to comment
Share on other sites

echoxxzz

Here is the log file immediately after I clicked the home button after letting the server sit for a few hours with no usage. This time it didn't ever finish filling in the cover art for the home page. 

log.txt

Link to comment
Share on other sites

  • 1 month later...
Tandhruil

Well, I've just migrate on a Synology solution and I've got the same problem.

Any News about a solution ?

Link to comment
Share on other sites

1 hour ago, Tandhruil said:

Well, I've just migrate on a Synology solution and I've got the same problem.

Any News about a solution ?

Please attach the emby server log, thanks.

Link to comment
Share on other sites

Tandhruil
On 6/16/2020 at 4:53 PM, Luke said:

Please attach the emby server log, thanks.

Hi,

Here are the logs...

I'm on a DS220j.

For exemple, changing identification of a movie can take 5 minutes or 30 seconds and when I watch the Synology dashboard : UC is about 3%, RAM 70% and HDD 100%

 

 

Edited by Tandhruil
Link to comment
Share on other sites

Tandhruil

Hello,
Any news ? I've tried to implement the indexation service (multimedia and files) on the Emby directory but it doesn't seem to change anything.
I created a library dedicated to my personnal pictures and it's almost impossible to watch pictures.
It seems like Emby is not working in background to generate the thumbnails.

Link to comment
Share on other sites

yarez0

hi guys, seems that your synos are too light. I had a 412+ in the beginning and it was not powerfull enough to do all the thumbs, viewing and transcoding fine. I change to a 916+ with 8 GB of RAM and 7,2k RPM disks and it works fine, with a little latency some times but still better than a 4xx or a 2xx

Edited by yarez0
Link to comment
Share on other sites

Yes I would just disable the thumbnail generation option and then I think you will be fine.

Link to comment
Share on other sites

  • 2 weeks later...
Tandhruil
On 7/5/2020 at 10:25 PM, Luke said:

Yes I would just disable the thumbnail generation option and then I think you will be fine.

Hi,

What do you mean by disabling thumbnails ?
I can't imagine Emby with no thumbnail, it's for me the main utility of Emby to show illustrations of the medias while browsing.
Why can't you generate the thumbnails once for all juste like a wordpress website ?
Bytheway, why do you generate different thumbnails for each user ?
Now if the minimum requirement to install Emby on a Synology is a DS916+ with more than 8 GB RAM, I think it should be mention in the wiki (readme first) for the next users.
The only limitation I've found was for playing 4K movies, I don't have 4K movie and I have no issue playing films.

Link to comment
Share on other sites

Tandhruil
7 minutes ago, Luke said:

For those interested in testing new things:

Thanks.

It's possible to run a .NET app on a Synology ?

Link to comment
Share on other sites

Just now, Tandhruil said:

It's possible to run a .NET app on a Synology ?

.NET Core, yes. Instructions are in the thread I linked no. 

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...