Jump to content

Server constantly crashing or hanging


imagineverything

Recommended Posts

Ian-Highlander

Well I got to the bottom of my main issues eventually...

 

I finally gave in and removed the AutoBoxSets plugin as a test, and my system suddenly went 100% perfect for several days, something it's NEVER done before (presumably because I've always installed that particular plugin). Add it back in and within hours the system has locked up with processor usage pegging 25% again, nothing available in EMC or the web client at all and the server is apparently doing nothing at all (no scheduled tasks running) and there's nothing in the logs. Remove it again and server has again been rock solid for days.

 

For the record I have only ever installed the AutoBoxSets plugin on this system since the rebuild, it's the only one I always installed by default. It (the plugin) was always updated as soon as an update notification appeared so it was always running the latest versions and our system has ALWAYS had this problem, something I just put up with (and in fact had written a batch file to restart the service overnight every night to try and get round the problem).

 

It does make a bit of a mockery of having these useful plugins if they break the system so badly. We can live without the boxsets plugin here if it means the system is going to be rock solid, but I would have preferred that it worked as it is a useful one.

 

Any ideas @@Luke ? It would be nice if the problem could be resolved so the plugin could be installable again without grinding the server to a halt every few hours.

Edited by Ian-Highlander
Link to comment
Share on other sites

Steven

Well I got to the bottom of my main issues eventually...

 

I finally gave in and removed the AutoBoxSets plugin as a test, and my system suddenly went 100% perfect for several days, something it's NEVER done before (presumably because I've always installed that particular plugin). 

 

 

I have been having issues for quite a while with Emby maxing out my server cpu which cripples access to it requiring me to kill the process and restart, but it happens every day. I ended up stopping all library scans but it became quite a pain adding new movies as once I initialised a scan to detect a new movie I would be in the same position.

 

Anyway, I found your post while searching for a solution and gave it a try. I have always used auto boxsets and it would never cross my mind it could be that, but it appears to be! I removed the plugin and the folders it had built in "AppData\Roaming\MediaBrowser-Server\data\collections" and performance is great again. Now when it's scanning my library my cpu usage is low and it does not stop library access.

 

Scans still take a while for me due to re-searching musicbrainz for a lot of music I have that isn't listed, but at least this is not affecting anything.

 

So thanks for the tip and hopefully it's something the devs can look into.

Edited by Steven
Link to comment
Share on other sites

Ian-Highlander

I have been having issues for quite a while with Emby maxing out my server cpu which cripples access to it requiring me to kill the process and restart, but it happens every day. I ended up stopping all library scans but it became quite a pain adding new movies as once I initialised a scan to detect a new movie I would be in the same position.

 

Anyway, I found your post while searching for a solution and gave it a try. I have always used auto boxsets and it would never cross my mind it could be that, but it appears to be! I removed the plugin and the folders it had built in "AppData\Roaming\MediaBrowser-Server\data\collections" and performance is great again. Now when it's scanning my library my cpu usage is low and it does not stop library access.

 

Scans still take a while for me due to re-searching musicbrainz for a lot of music I have that isn't listed, but at least this is not affecting anything.

 

So thanks for the tip and hopefully it's something the devs can look into.

Nice to see it wasn't just me that had this issue with the AutoBoxSets plugin. It's definitely cured my issue removing it which is a shame.

 

As for the MusicBrainz issue, I had exactly the same problem with that too, but as I'd tagged all my music with MusicBrainz picard already (and do with any new stuff too), I just removed Musicbrainz from the options in the metadata settings on the server and my scan times are back to normal again.

Link to comment
Share on other sites

Ian-Highlander

Ok, for the sake of finding the issue I will re-add the plugin and see what happens.

I also did that and the problem came back within hours. Removed it again, problem went away again and hasn't come back, it's definitely the plugin that causes it, just wish it could be sorted as I like the plugin.

Edited by Ian-Highlander
Link to comment
Share on other sites

In the log Ian posted, the only reference to the plug-in is it loading.  It isn't doing anything during his scan.

 

The log is filled with time-outs from the movie db trying to find people though.

 

Could it be the existence of box sets in general as opposed to just the automatic ones?

Link to comment
Share on other sites

Ian-Highlander

In the log Ian posted, the only reference to the plug-in is it loading.  It isn't doing anything during his scan.

 

The log is filled with time-outs from the movie db trying to find people though.

 

Could it be the existence of box sets in general as opposed to just the automatic ones?

Probably not much help for you to diagnose, but I've never manually created box sets, closest I ever got was adding one film to a set that I felt it should have been in. I can re-add the plugin again if need be if it will help you diagnose anything, but it doesn't appear to log anything indeed the server doesn't appear to be doing anything at all when this happens but it pegs an 8 core i7 at 25% usage until you restart the service. Remove the plugin and that problem never comes back.

 

The people thing is something I'm slowly going through and sorting the hard way (not a fun job).

Edited by Ian-Highlander
Link to comment
Share on other sites

Can you install the plug-in and let it create its sets. Then remove the plug-in but leave the box sets and see if the problem re-occurs.  Thx.

Link to comment
Share on other sites

Ian-Highlander

Can you install the plug-in and let it create its sets. Then remove the plug-in but leave the box sets and see if the problem re-occurs.  Thx.

Doing it now...

 

Edit: actually my server is a couple of versions behind (3.0.5781.8) so will upgrade that first and then re-install the plugin and monitor it.

Edited by Ian-Highlander
Link to comment
Share on other sites

solidus28

I don't want to sidetrack this conversation, but is there any possibility that the issue being discussed in this topic is also the cause of the No Items after Upgrade topic (http://emby.media/community/index.php?/topic/26867-no-items-after-upgrade/)?  I've removed the AutoBoxSets plugin from my server this morning to see if that improves my issues that require constant restarts.

Link to comment
Share on other sites

Steven

As for the MusicBrainz issue, I had exactly the same problem with that too, but as I'd tagged all my music with MusicBrainz picard already (and do with any new stuff too), I just removed Musicbrainz from the options in the metadata settings on the server and my scan times are back to normal again.

 

Another great tip. That has massively improved scan times. Thanks.

  • Like 1
Link to comment
Share on other sites

Ian-Highlander

I don't want to sidetrack this conversation, but is there any possibility that the issue being discussed in this topic is also the cause of the No Items after Upgrade topic (http://emby.media/community/index.php?/topic/26867-no-items-after-upgrade/)?  I've removed the AutoBoxSets plugin from my server this morning to see if that improves my issues that require constant restarts.

Can't tell you if it's the root of all your problems, but certainly the server locking up, not giving anything on EMC or the web client and pegging the processor (at 25% in my case) until the service was restarted at which time everything works perfectly for a few hours til it does it again was definitely the AutoBoxSets plugin on mine.

 

Quite why, I don't know and hopefully @@ebr will be able to get to the bottom of it with our help as I'd like to be able to use the plugin again.

Link to comment
Share on other sites

Ian-Highlander

Can you install the plug-in and let it create its sets. Then remove the plug-in but leave the box sets and see if the problem re-occurs.  Thx.

Plugin re-installed, box sets created (144 of them), plugin uninstalled again but folder structure left in place. Will update if/when it crashes again.

Link to comment
Share on other sites

Ian-Highlander

@@ebr Apologies, on checking my backups, I HAD previously created two collections manually (Sarah Milican and Ice Age Shorts) as Auto Box Sets hadn't picked them up. I haven't re-created those yet this time, will give it a while and see if it causes an issue and if not, then add those two back manually again and see if the problem then returns.

Edited by Ian-Highlander
Link to comment
Share on other sites

It shouldn't make any difference.  I'm just trying to determine if the issue is actually related to the plug-in or the existence of box sets.  Whether they were created by the plug-in or not should not matter (theoretically).

  • Like 1
Link to comment
Share on other sites

Steven

I don't have any manually created boxsets as I removed them all when you first released this plugin.

 

I added the plugin again earlier and so far so good. I have 127 boxsets and was impressed how quickly they were all created - it took about 1 minute to identify and grab all metadata/images.

 

Like I said I have had this issue for some months and only since removing this plugin and starting over has it resolved. It doesn't seem right that this should have any effect though... I'll keep an eye on it.

Link to comment
Share on other sites

Steven

I just had an unhandled error related to collections causing Emby to crash.

Collection was modified; enumeration operation may not execute.
System.InvalidOperationException
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at MediaBrowser.Controller.Entities.Folder.AddChildren(User user, Boolean includeLinkedChildren, Dictionary`2 result, Boolean includeHidden, Boolean recursive, Func`2 filter)
   at MediaBrowser.Controller.Entities.Folder.GetChildren(User user, Boolean includeLinkedChildren, Boolean includeHidden)
   at MediaBrowser.Controller.Entities.Movies.BoxSet.GetChildren(User user, Boolean includeLinkedChildren)
   at MediaBrowser.Controller.Entities.Movies.BoxSet.IsVisible(User user)
   at MediaBrowser.Controller.Entities.Folder.AddChildren(User user, Boolean includeLinkedChildren, Dictionary`2 result, Boolean includeHidden, Boolean recursive, Func`2 filter)
   at MediaBrowser.Controller.Entities.Folder.GetChildren(User user, Boolean includeLinkedChildren, Boolean includeHidden)
   at MediaBrowser.Controller.Entities.Folder.GetChildren(User user, Boolean includeLinkedChildren)
   at MediaBrowser.Server.Implementations.Collections.ManualCollectionsFolder.IsVisible(User user)
   at MediaBrowser.Controller.Entities.Folder.AddChildren(User user, Boolean includeLinkedChildren, Dictionary`2 result, Boolean includeHidden, Boolean recursive, Func`2 filter)
   at MediaBrowser.Controller.Entities.Folder.GetChildren(User user, Boolean includeLinkedChildren, Boolean includeHidden)
   at MediaBrowser.Controller.Entities.Folder.GetChildren(User user, Boolean includeLinkedChildren)
   at MediaBrowser.Controller.Entities.BaseItem.IsVisibleStandaloneInternal(User user, Boolean checkFolders)
   at MediaBrowser.Controller.Entities.BaseItem.IsVisibleStandalone(User user)
   at MediaBrowser.Server.Implementations.EntryPoints.LibraryChangedNotifier.TranslatePhysicalItemToUserLibrary[T](T item, User user, Boolean includeIfNotFound)
   at MediaBrowser.Server.Implementations.EntryPoints.LibraryChangedNotifier.<>c__DisplayClass28.<GetLibraryUpdateInfo>b__1b(BaseItem i)
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<DistinctIterator>d__81`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at MediaBrowser.Server.Implementations.EntryPoints.LibraryChangedNotifier.GetLibraryUpdateInfo(IEnumerable`1 itemsAdded, IEnumerable`1 itemsUpdated, IEnumerable`1 itemsRemoved, IEnumerable`1 foldersAddedTo, IEnumerable`1 foldersRemovedFrom, Guid userId)
   at MediaBrowser.Server.Implementations.EntryPoints.LibraryChangedNotifier.<SendChangeNotifications>d__f.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Link to comment
Share on other sites

solidus28

Can't tell you if it's the root of all your problems, but certainly the server locking up, not giving anything on EMC or the web client and pegging the processor (at 25% in my case) until the service was restarted at which time everything works perfectly for a few hours til it does it again was definitely the AutoBoxSets plugin on mine.

 

Quite why, I don't know and hopefully @@ebr will be able to get to the bottom of it with our help as I'd like to be able to use the plugin again.

May be too early to call, but after removing Auto Box Sets plugin and restarting nearly 8 hours ago, this is the first time in over 2 months that my htpc launched EMC successfully without having to restart the server again. I will leave it off and see if it continues to behave tomorrow.

Link to comment
Share on other sites

JeremyFr79

After wiping my entire installation and starting over from scratch like I posted earlier I have not had a single issue with Crashes, and AutoBoxSet's has been working fine on my installation.

Link to comment
Share on other sites

Ian-Highlander

After wiping my entire installation and starting over from scratch like I posted earlier I have not had a single issue with Crashes, and AutoBoxSet's has been working fine on my installation.

Neither did I for the first few days or so, but if yours is ok I'm very pleased for you. It's definitely the AutoBoxSets (or something related to collections at least) that's causing the issue on mine and a few other peoples. Fingers crossed we get to the bottom of it as I'd like to use it again.

Link to comment
Share on other sites

Ian-Highlander

@@ebr

 

System died again just as it used to (25% cpu, doing nothing and nothing available on clients), so that would seem to conclusively point to the collections being present and not the plugin (or possibly something the plugin writes to the xmls causing a conflict or the square brackets in the foldernames?).

 

 

Last three log files attached, I've deleted the collections folder again and restarted it again, although I kept a back up of the directory incase the files in it are of any use to you for diagnosis. Let me know if you need them.

logs.zip

Edited by Ian-Highlander
Link to comment
Share on other sites

Thanks.  Can you do one more thing for me?  Can you create a couple of manual collections and then see if the problem comes back?

 

I don't think there would be any difference between collections created by the plug-in vs. the web interface (they both use the same function) but its worth a shot.  It also could be related to the number of collections so, if the problem doesn't come back it won't really be a definitive test.  But, if it does, it will.

 

Luke - any ideas why collections are causing the server to go off into the weeds...?

Link to comment
Share on other sites

Ian-Highlander

Thanks.  Can you do one more thing for me?  Can you create a couple of manual collections and then see if the problem comes back?

 

I don't think there would be any difference between collections created by the plug-in vs. the web interface (they both use the same function) but its worth a shot.  It also could be related to the number of collections so, if the problem doesn't come back it won't really be a definitive test.  But, if it does, it will.

 

Luke - any ideas why collections are causing the server to go off into the weeds...?

I'll set a couple of manual ones up tonight and update if anything happens (usually takes a few hours to go wrong).

Link to comment
Share on other sites

Ian-Highlander

Thanks.  Can you do one more thing for me?  Can you create a couple of manual collections and then see if the problem comes back?

 

I don't think there would be any difference between collections created by the plug-in vs. the web interface (they both use the same function) but its worth a shot.  It also could be related to the number of collections so, if the problem doesn't come back it won't really be a definitive test.  But, if it does, it will.

 

Luke - any ideas why collections are causing the server to go off into the weeds...?

Sorry, only just got round to doing this, I've just manually created two collections and will update if it does the same thing when/if it does.

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