Jump to content

Emby server crashing constantly with .NET Application Error


Faceman09

Recommended Posts

Faceman09

For the last 4 days I have been having constant Emby server failures and corresponding .NET errors in the Windows Application log.

 

Not sure anything has changed at the time to start these issues, no Emby update, not /NET update and no Windows updates etc.

 

It is happening more and more frequently - each time I restart the server I am now only  getting 40 minutes or so before the next crash and having to manually restart the application.

 

Error in Windows Application log file as below - any assistance much appreciated! Driving the family mad :)

 

 

Log Name:      Application
Source:        .NET Runtime
Date:          27/11/2016 21:52:39
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      COMPUTER_NAME
Description:
Application: MediaBrowser.ServerApplication.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
   at ImageMagickSharp.MagickWandInterop.MagickReadImage(IntPtr, System.String)
   at ImageMagickSharp.MagickWand.OpenImage(System.String)
   at ImageMagickSharp.MagickWand..ctor(System.String)
   at Emby.Drawing.ImageMagick.ImageMagickEncoder.EncodeImage(System.String, System.String, Boolean, Int32, Int32, Int32, MediaBrowser.Controller.Drawing.ImageProcessingOptions, MediaBrowser.Model.Drawing.ImageFormat)
   at Emby.Drawing.ImageProcessor+<ProcessImage>d__27.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Start[[Emby.Drawing.ImageProcessor+<ProcessImage>d__27, Emby.Drawing, Version=3.0.8500.0, Culture=neutral, PublicKeyToken=null]](<ProcessImage>d__27 ByRef)
   at Emby.Drawing.ImageProcessor.ProcessImage(MediaBrowser.Controller.Drawing.ImageProcessingOptions)
   at MediaBrowser.Api.Images.ImageService+<GetImageResult>d__23.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Start[[MediaBrowser.Api.Images.ImageService+<GetImageResult>d__23, MediaBrowser.Api, Version=3.0.8500.0, Culture=neutral, PublicKeyToken=null]](<GetImageResult>d__23 ByRef)
   at MediaBrowser.Api.Images.ImageService.GetImageResult(MediaBrowser.Controller.Entities.IHasImages, MediaBrowser.Api.Images.ImageRequest, MediaBrowser.Controller.Entities.ItemImageInfo, Boolean, System.Collections.Generic.List`1<MediaBrowser.Model.Drawing.ImageFormat>, System.Collections.Generic.List`1<MediaBrowser.Controller.Providers.IImageEnhancer>, System.Nullable`1<System.TimeSpan>, System.Collections.Generic.IDictionary`2<System.String,System.String>, Boolean)
   at MediaBrowser.Api.Images.ImageService.GetImage(MediaBrowser.Api.Images.ImageRequest, MediaBrowser.Controller.Entities.IHasImages, Boolean)
   at MediaBrowser.Api.Images.ImageService.Get(MediaBrowser.Api.Images.GetItemImage)
   at ServiceStack.Host.ServiceRunner`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Execute(ServiceStack.Web.IRequest, System.Object, System.__Canon)
   at ServiceStack.Host.ServiceExec`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Execute(ServiceStack.Web.IRequest, System.Object, System.Object, System.String)
   at ServiceStack.Host.ServiceRequestExec`2[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=],[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Execute(ServiceStack.Web.IRequest, System.Object, System.Object)
   at ServiceStack.Host.ServiceController.ManagedServiceExec(ServiceStack.Host.ServiceExecFn, ServiceStack.IService, ServiceStack.Web.IRequest, System.Object)
   at ServiceStack.Host.ServiceController+<>c__DisplayClass37_0.<RegisterServiceExecutor>b__0(ServiceStack.Web.IRequest, System.Object)
   at ServiceStack.Host.ServiceController.Execute(System.Object, ServiceStack.Web.IRequest)
   at ServiceStack.HostContext.ExecuteService(System.Object, ServiceStack.Web.IRequest)
   at ServiceStack.Host.RestHandler.GetResponse(ServiceStack.Web.IRequest, System.Object)
   at ServiceStack.Host.RestHandler+<ProcessRequestAsync>d__13.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[serviceStack.Host.RestHandler+<ProcessRequestAsync>d__13, ServiceStack, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]](<ProcessRequestAsync>d__13 ByRef)
   at ServiceStack.Host.RestHandler.ProcessRequestAsync(ServiceStack.Web.IRequest, ServiceStack.Web.IResponse, System.String)
   at MediaBrowser.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>d__49.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[MediaBrowser.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>d__49, MediaBrowser.Server.Implementations, Version=3.0.8500.0, Culture=neutral, PublicKeyToken=null]](<RequestHandler>d__49 ByRef)
   at MediaBrowser.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(ServiceStack.Web.IHttpRequest, System.Uri)
   at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.WebSocketSharpListener.ProcessRequestAsync(SocketHttpListener.Net.HttpListenerContext)
   at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.WebSocketSharpListener.InitTask(SocketHttpListener.Net.HttpListenerContext)
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
 
 
Event Xml:
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-11-27T21:52:39.443876500Z" />
    <EventRecordID>2926</EventRecordID>
    <Channel>Application</Channel>
    <Computer>COMPUTER_NAME</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: MediaBrowser.ServerApplication.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
   at ImageMagickSharp.MagickWandInterop.MagickReadImage(IntPtr, System.String)
   at ImageMagickSharp.MagickWand.OpenImage(System.String)
   at ImageMagickSharp.MagickWand..ctor(System.String)
   at Emby.Drawing.ImageMagick.ImageMagickEncoder.EncodeImage(System.String, System.String, Boolean, Int32, Int32, Int32, MediaBrowser.Controller.Drawing.ImageProcessingOptions, MediaBrowser.Model.Drawing.ImageFormat)
   at Emby.Drawing.ImageProcessor+<ProcessImage>d__27.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Start[[Emby.Drawing.ImageProcessor+<ProcessImage>d__27, Emby.Drawing, Version=3.0.8500.0, Culture=neutral, PublicKeyToken=null]](<ProcessImage>d__27 ByRef)
   at Emby.Drawing.ImageProcessor.ProcessImage(MediaBrowser.Controller.Drawing.ImageProcessingOptions)
   at MediaBrowser.Api.Images.ImageService+<GetImageResult>d__23.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Start[[MediaBrowser.Api.Images.ImageService+<GetImageResult>d__23, MediaBrowser.Api, Version=3.0.8500.0, Culture=neutral, PublicKeyToken=null]](<GetImageResult>d__23 ByRef)
   at MediaBrowser.Api.Images.ImageService.GetImageResult(MediaBrowser.Controller.Entities.IHasImages, MediaBrowser.Api.Images.ImageRequest, MediaBrowser.Controller.Entities.ItemImageInfo, Boolean, System.Collections.Generic.List`1<MediaBrowser.Model.Drawing.ImageFormat>, System.Collections.Generic.List`1<MediaBrowser.Controller.Providers.IImageEnhancer>, System.Nullable`1<System.TimeSpan>, System.Collections.Generic.IDictionary`2<System.String,System.String>, Boolean)
   at MediaBrowser.Api.Images.ImageService.GetImage(MediaBrowser.Api.Images.ImageRequest, MediaBrowser.Controller.Entities.IHasImages, Boolean)
   at MediaBrowser.Api.Images.ImageService.Get(MediaBrowser.Api.Images.GetItemImage)
   at ServiceStack.Host.ServiceRunner`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Execute(ServiceStack.Web.IRequest, System.Object, System.__Canon)
   at ServiceStack.Host.ServiceExec`1[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Execute(ServiceStack.Web.IRequest, System.Object, System.Object, System.String)
   at ServiceStack.Host.ServiceRequestExec`2[[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=],[system.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=]].Execute(ServiceStack.Web.IRequest, System.Object, System.Object)
   at ServiceStack.Host.ServiceController.ManagedServiceExec(ServiceStack.Host.ServiceExecFn, ServiceStack.IService, ServiceStack.Web.IRequest, System.Object)
   at ServiceStack.Host.ServiceController+<>c__DisplayClass37_0.<RegisterServiceExecutor>b__0(ServiceStack.Web.IRequest, System.Object)
   at ServiceStack.Host.ServiceController.Execute(System.Object, ServiceStack.Web.IRequest)
   at ServiceStack.HostContext.ExecuteService(System.Object, ServiceStack.Web.IRequest)
   at ServiceStack.Host.RestHandler.GetResponse(ServiceStack.Web.IRequest, System.Object)
   at ServiceStack.Host.RestHandler+<ProcessRequestAsync>d__13.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[serviceStack.Host.RestHandler+<ProcessRequestAsync>d__13, ServiceStack, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]](<ProcessRequestAsync>d__13 ByRef)
   at ServiceStack.Host.RestHandler.ProcessRequestAsync(ServiceStack.Web.IRequest, ServiceStack.Web.IResponse, System.String)
   at MediaBrowser.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>d__49.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[MediaBrowser.Server.Implementations.HttpServer.HttpListenerHost+<RequestHandler>d__49, MediaBrowser.Server.Implementations, Version=3.0.8500.0, Culture=neutral, PublicKeyToken=null]](<RequestHandler>d__49 ByRef)
   at MediaBrowser.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(ServiceStack.Web.IHttpRequest, System.Uri)
   at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.WebSocketSharpListener.ProcessRequestAsync(SocketHttpListener.Net.HttpListenerContext)
   at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.WebSocketSharpListener.InitTask(SocketHttpListener.Net.HttpListenerContext)
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
 
</Data>
  </EventData>
</Event>

 

 

Link to comment
Share on other sites

Happy2Play
Link to comment
Share on other sites

Faceman09

Server log attached from last restart to latest crash - just crashed out half way through watching a file.

 

I haven't restarted today when frequency of crashed seems to have increased considerably (that or I've just been about to restart it more frequently :) ),  but have restarted the box since it initially began.

 

I have a whole bunch of Win 10 updates to apply as well including Anniversary Edition update - worth applying and restarting the box?

 

What is the thinking? Hard disk read issue?

Edited by Faceman09
Link to comment
Share on other sites

Faceman09

No solution yet, fully updated the box to latest Win 10 Anniversary Edition build and all outstanding updates and rebooted.

 

Emby server still crashes within 5 minutes of starting - enabled debug logging and everytime it crashes last line of the log is regards image processor creating an image collage into the temp folder:

 

@@Luke or @@Happy2Play - any ideas - log excerpts below - none of the temp files detailed exist in that file path.

 

 

Crash 1
2016-11-29 18:58:46.1086 Info ImageProcessor: Creating image collage and saving to C:\_Application Storage\MediaBrowser Server Cache\cache\temp\0c0ba4f337aa44e683bb4bd68df76fff.png
 
 
Crash 2
2016-11-30 13:09:03.6689 Info ImageProcessor: Creating image collage and saving to C:\_Application Storage\MediaBrowser Server Cache\cache\temp\f5e7de285b7d47799e5c0ef5092531dd.png
 
 
Crash 3
2016-11-30 15:47:13.8978 Info ImageProcessor: Creating image collage and saving to C:\_Application Storage\MediaBrowser Server Cache\cache\temp\3b613d41a46f433eb71ece68be07735d.png
 
 
Crash 4
2016-11-30 19:47:47.5351 Debug App: Running post-scan task LocalTrailerPostScanTask
2016-11-30 19:47:47.6913 Debug App: Running post-scan task ArtistsPostScanTask
2016-11-30 19:47:50.1133 Debug App: Running post-scan task GameGenresPostScanTask
2016-11-30 19:47:50.1133 Debug App: Running post-scan task GenresPostScanTask
2016-11-30 19:47:50.1758 Debug App: Running post-scan task MusicGenresPostScanTask
2016-11-30 19:47:50.2227 Debug App: Running MusicGenreImageProvider for C:\_Application Storage\MediaBrowser MetaData\metadata\MusicGenre\Blues
2016-11-30 19:47:50.2852 Debug App: Running MusicGenreImageProvider for C:\_Application Storage\MediaBrowser MetaData\metadata\MusicGenre\Classic
2016-11-30 19:47:50.3321 Debug App: Running MusicGenreImageProvider for C:\_Application Storage\MediaBrowser MetaData\metadata\MusicGenre\Cool Music
2016-11-30 19:47:50.3633 Debug App: Running MusicGenreImageProvider for C:\_Application Storage\MediaBrowser MetaData\metadata\MusicGenre\Dance
2016-11-30 19:47:50.3946 Info ImageProcessor: Creating image collage and saving to C:\_Application Storage\MediaBrowser Server Cache\cache\temp\83e682c3fb514a249402a6c82df3d151.png
Link to comment
Share on other sites

Silly questions maybe, but:

 

  1. does the Emby user have write permissions for the "_Application Storage" folder and sub folders?
  2. Also would the "_" preceding Application be causing .Net or something else to have an issue?
Link to comment
Share on other sites

In one of the logs above I saw ImageMagik crashing trying to read an image file.  Maybe a corrupt image..?

Link to comment
Share on other sites

When exactly does this happen? For example, just starting up the server, or is it when you browse to a certain screen?

Link to comment
Share on other sites

Faceman09

Mine were occurring on every library scan which were initiated directly at startup, got to 90.4% completion and bombed out.

 

Although I have now resolved it it would appear. 

 

Noticed some huge latency (10-15 seconds) when browsing in Win Explorer to a share on one of my other servers that is part of my media library - not sure if controller or disk related (chkdsk reports no errors) but a reboot of that server seems to have resolved the issue for me - library scan complete and Emby server been up for 3 hours now.

 

So guessing that following my comments above regards it always crashing on a "Creating Image Collage" entry in the logs that it must have been trying to access one of the local images in that part of the library and bombing out??

Link to comment
Share on other sites

Thanks for the report. It's hard to say unfortunately, but sounds disk-related to me. chkdsk is not an exhaustive diagnostic.

Link to comment
Share on other sites

vick1982

the emby server has been doing this for me for ages now... i had to setup a external network monitor to email me when the emby server stops responding... so i can RDP into the server and restart it.. its very annoying. Family members are always messaging me in the day when they are trying to access it.

 

when it happens for me.. i can no longer access the server from the web browser or any apps..  I have ssl setup with a trusted certificate.  Im thinking it might have something to do with ssl ?? i hope not as i would only be using web access and apps externally with ssl.

 

The only thing that still works when it happens is my htpc with kodi and emby addon and web access on the actual server itself..

Edited by vick1982
Link to comment
Share on other sites

vick1982

should i start a new thread about my specific issue?  my 1 year subscription just ended and im not going to do a lifetime subscription if this isn't resolved. I may have to move to plex which i am testing on the side now and hasn't had any of these problems and provides proper encryption standard  that works with browser or apps and doesn't cause issues. I would prefer to support emby but needing to restart the server all the time just sucks,

Edited by vick1982
Link to comment
Share on other sites

should i start a new thread about my specific issue?  my 1 year subscription just ended and im not going to do a lifetime subscription if this isn't resolved. I may have to move to plex which i am testing on the side now and hasn't had any of these problems and provides proper encryption standard  that works with browser or apps and doesn't cause issues. I would prefer to support emby but needing to restart the server all the time just sucks,

 

Hi, sorry to hear about this. Please provide more detail about your issue and we'll do our best to help you. Thanks !

Link to comment
Share on other sites

vick1982

basically the server will no longer give access to web browser or apps all the time and the only way to resolve it is to restart emby. It doesnt affect my local htpc's that use kodi and the emby addon or web access on the actual server pc.

 

do i need to enable debug logging to get better idea what might cause this or normal logs should show it ?

Link to comment
Share on other sites

the last time is happened was about 13:53 on the below file .. maybe this will show something

https://paste2.org/7B8ItfvW

 

Can you attach the complete log file from the beginning? Also was there another log in the directory starting with unhandled_?

Link to comment
Share on other sites

vick1982

Do you also lose http connectivity also when this happens?

 

any web browser thats not the server itself and any phone/tablet apps .. 

Link to comment
Share on other sites

vick1982

Can you attach the complete log file from the beginning? Also was there another log in the directory starting with unhandled_?

 

no unhanlded one..  do i need to change the name of my domain name showing on the logs for security ?

Edited by vick1982
Link to comment
Share on other sites

no unhanlded one..  do i need to change the name of my domain name showing on the logs for security ?

 

If you want, or you can PM me the log. thanks.

Link to comment
Share on other sites

Happy2Play

So external connects stop responding but access via the server machine is still available?  The server itself never actually crashes.

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