Jump to content

Emby server crashes randomly during periods of "inactivity"


williamkray
 Share

Recommended Posts

williamkray

I am not sure how to recreate the issue, but for a couple months now my emby-server has just crashed maybe once or twice a day, and I need to restart the service. I kept hoping the next update would resolve it, but it hasn't happened yet...

 

I'm running v3.0.5972 on Arch Linux 64 bit, with an Intel i7 processor and 32GB of RAM.

[root@potatofarm]# mono --version
Mono JIT compiler version 4.2.2 (Stable 4.2.2.30/996df3c Sun Jan 31 11:58:08 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

When emby is performing normally, I connect to it regularly with my android device and my Kodi device running the Emby plugin for library sync (the server is also running the relevant library sync helper). I don't see anything in the logs that indicates it's related to the library sync helper, but I can't really make heads or tails of these logs anyway.

 

I've disabled all DLNA features of the server because I don't use it, and I saw other people with mysterious crashing issues that were resolved by avoiding DLNA. This doesn't seem to have helped anything.

 

I have lots and lots and lots of small log files which appear to indicate unhandled exceptions, which i'm including the most recent ones of here, along with the last couple of server log files. This is difficult for me to pin down the exact log entries and times specifically because it seems to happen when we're not paying attention to it... we just go over to Kodi and it can't connect, or it already has a warning that the sync thread has failed (presumably because it can't connect).

 

Please let me know if there are any other datapoints i should try to hit.

 

 

emby_logs.tar.gz

Link to comment
Share on other sites

williamkray

oops, you can ignore server-63602557677.txt since that one is after a fresh restart and doesn't have any errors that in it.

 

EDIT: Also, i just found this post http://emby.media/community/index.php?/topic/35915-linux-1404-lts-emby-server-stops-responding/

which suggests updating to mono 4.2.3, which i will attempt now. it may be a trick, since Arch is already on 4.4 or some nonsense.

Edited by williamkray
Link to comment
Share on other sites

  • 5 weeks later...
williamkray

i've been running that version of mono since i posted that (a little less than a month) and i'm still seeing the problem. it seems to be less often, but that could just be me making things up.

 

i'm going to upgrade to the latest version that was released (emby 3.0.6 or whatever) and see if that does it, and if not, i'll also upgrade mono to the latest 4.4 version in the arch repos, and report back.

Link to comment
Share on other sites

  • 4 weeks later...
williamkray

so just to follow up, it seems like Mono 4.2.3 with emby-server 3.0.5986 has eliminated the problems... i'm guessing that it had something to do with the fixes to work with newer versions of mono, which started getting added right around this version. i'll circle around again if the issue comes back. i'm curious if i can start updating mono to the current version in the repos now.

Link to comment
Share on other sites

puithove

so just to follow up, it seems like Mono 4.2.3 with emby-server 3.0.5986 has eliminated the problems... i'm guessing that it had something to do with the fixes to work with newer versions of mono, which started getting added right around this version. i'll circle around again if the issue comes back. i'm curious if i can start updating mono to the current version in the repos now.

 

FWIW - I've been running on mono 4.4.1 with the latest Betas (I build frequently), and it's been completely stable.

Link to comment
Share on other sites

Sireone

I'm seeing these crashes too.  I've upgraded to Mono 4.4.2 Stable, but still crashes.  I've noticed on my console, Out of memory: Kill process 1285 (mono-sgen)... messages.  Do I need to go to 4.4.3 to fix these Mono memory issues?

Link to comment
Share on other sites

I'm seeing these crashes too.  I've upgraded to Mono 4.4.2 Stable, but still crashes.  I've noticed on my console, Out of memory: Kill process 1285 (mono-sgen)... messages.  Do I need to go to 4.4.3 to fix these Mono memory issues?

 

The best thing to do is provide an Emby Server log so that we can take a look:

 

http://emby.media/community/index.php?/topic/739-how-to-report-a-problem/

 

Thanks.

Link to comment
Share on other sites

Sireone

The best thing to do is provide an Emby Server log so that we can take a look:

 

http://emby.media/community/index.php?/topic/739-how-to-report-a-problem/

 

Thanks.

 

Here's the log file from this morning.  I think the issue may directly be related to Mono as the service started at 7:15am and crashed at 7:56am, though the last entry in the log is at 7:31am.  Seems to be some memory leak.

 

On the console, I see the following message:

 

[ 2500.628630] Out of memory: Kill process 1222 (mono-sgen) score 945 or sacrifice child

[ 2500.628664] Killed process 1222 (mono-sgen) total-vm:8835560kB, anon-rss:5789160kB, file-rss:0kB

 

https://paste2.org/ZDawNsMx

 

devon@emby:~$ service emby-server status
● emby-server.service - Emby Media Server
   Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-08-23 07:56:29 EDT; 10h ago
  Process: 2351 ExecStopPost=/usr/bin/emby-server clear (code=exited, status=0/SUCCESS)
  Process: 705 ExecStart=/usr/bin/emby-server start (code=exited, status=137)
 Main PID: 705 (code=exited, status=137)
 
Aug 23 07:14:51 emby systemd[1]: Started Emby Media Server.
Aug 23 07:15:03 emby su[705]: Successful su for emby by root
Aug 23 07:15:03 emby su[705]: + ??? root:emby
Aug 23 07:15:03 emby su[705]: pam_unix(su:session): session opened for user emby by (uid=0)
Aug 23 07:56:26 emby systemd[1]: emby-server.service: Main process exited, code=exited, status=137/n/a
Aug 23 07:56:29 emby systemd[1]: emby-server.service: Unit entered failed state.
Aug 23 07:56:30 emby systemd[1]: emby-server.service: Failed with result 'exit-code'.
Link to comment
Share on other sites

Sireone

So after looking into this further, I deleted the trigger for the Scan Media Library task.  7+ hours, no crash.  So it seems that library scanning is whats causing mono-sgen to chew up so much memory and eventually cause the emby service to crash.  What other options do I have?

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
 Share

×
×
  • Create New...