Jump to content

Fixed: Random crashes on Ubuntu 16.04


shep

Recommended Posts

FIXED! See edit at bottom of this post!

 

I'm experiencing random and frequent crashes on emby. Everything's up-to-date as best as I can tell (I only installed it a week ago). So far I'm still in the "configuration" process, so I haven't even gotten to try out the media side of things. It seems far more polished than any other alternative I've tried though (well worth the $5 a month), but until I can get past this crashing issue, I don't know that I can fully enjoy it!

 

Here's the (censored) result from when I run this command:

sudo service emby-server status

post-146420-0-31061400-1469395290_thumb.png

 

It's strange because exit code 137 clearly means something, but I haven't found out what yet.

 

Also, because the crashes are so frequent, I am able to run the following command, mess around with it a bit, then grab just the relevant log:

#Removes emby logs for clarity
rm /var/lib/emby-server/logs/*.txt

After doing this, I messed around with it a bit, got the server to crash, and here's the full log from that session:

 

server-63604975699.txt

 

The only error I see is in there twice, and does not appear to be a critical one. Especially considering there were a couple info lines right after. It seems to be more of a completely fatal crash than anything.

 

The server does have a live URL that I can PM if desired. I'm also using s3fs-fuse to link to an Amazon S3 bucket for my media storage location.

 

Does anyone have any ideas on why I'm getting these random and frequent crashes?

 

EDIT 2016-08-13:

The fix was to obtain a better machine to run Emby. Running a t2.micro on Amazon EC2 is not enough resources to power Emby's awesomeness. The t2.small is the lowest tier that will work.

Edited by shep
Link to comment
Share on other sites

Hi, are you sure that's a full log? It's missing quite a bit from the beginning. I would also ensure you're running the latest version of Emby Server, 3.0.6000.

Link to comment
Share on other sites

Hi, are you sure that's a full log? It's missing quite a bit from the beginning. I would also ensure you're running the latest version of Emby Server, 3.0.6000.

Oops, outsmarted myself. I had the server running when I cleared out the old logs. Just cleared, then started the service, got it to crash again. Here's the full log this time!

 

server-63604978354.txt

 

Also, running version 3.0.5986.0, although the changelog doesn't list any crash fixes, so I don't know if that will fix it. Will try updating just in case and will report back.

Link to comment
Share on other sites

I would also suggest updating to either mono 4.2.3.4 or mono 4.4.1. The package update may take care of that for you though.

  • Like 1
Link to comment
Share on other sites

I would also suggest updating to either mono 4.2.3.4 or mono 4.4.1. The package update may take care of that for you though.

I think that's the ticket. I was looking for impacted outdated software somewhere, but sudo apt-get update && sudo apt-get upgrade wasn't pulling back anything new. Just did a full upgrade of mono, will report back on how it works!

 

EDIT: Also updated emby manually, forgot to mention that

Edited by shep
Link to comment
Share on other sites

try locating the server's system.xml config file and removing your custom CertificatePath. Additionally try going back to the default ports of 8096 and 8920.

Link to comment
Share on other sites

try locating the server's system.xml config file and removing your custom CertificatePath. Additionally try going back to the default ports of 8096 and 8920.

Did not appear to fix the issue.

 

server-63604980841.txt

 

What else can I try?

Link to comment
Share on other sites

I don't know. It sounds like something environmental at this point so it's hard for me to say. if it's an a VM maybe try giving it another cpu.

Link to comment
Share on other sites

thefirstofthe300

What is the output of "ls -la /var/lib/emby-server"?  Emby will crash if it doesn't have sufficient permissions for the config directory.  Did you happen to change the user Emby is running as?

  • Like 1
Link to comment
Share on other sites

post-146420-0-56475800-1469441927_thumb.png

 

I'm thinking it's a RAM issue. The server only has 512MB of RAM, but the s3fs_fuse package requires any file that is "in use" by S3 to be loaded in full in memory. For pictures this isn't a big deal, but I do have some videos that are larger than the entirety of my RAM (4K isn't exactly "small" per se). I suspect a background process that is trying to sync the pictures is running out of memory in the process and is fatally crashing, while also failing to log it as a result.

 

The solution will (hopefully) be to acquire a VM on Amazon's servers and avoid the hassle associated with using the s3fs_fuse package. I've already got a fresh install of emby on a different server operating with no issues thus far, and the only difference is the lack of any S3 drive on it.

Link to comment
Share on other sites

Guest plexman

I had the same issue, I posted in an other post. But, exactly the same problem, systemctl showing this exit code failed. I have a dedicated machine so I don't think the problem is on thw cores. I'll post my server's log when i'll come to my house.

Edited: also running ubuntu 16.04

Edited by plexman
Link to comment
Share on other sites

I've acquired an Amazon VM, installed emby, haven't had any more issues yet BUT I also haven't loaded any files in yet. Fingers crossed!

 

(Side note: the CPU cores are irrelevant to my issue, it was having 512MB of RAM and an S3 setup that did me in)

Link to comment
Share on other sites

Resolution:

Use native Linux filesystems, not fuse. Fuse is crap for this.

 

Tried editing the title of the thread to add the standard "[solved]" tag, seems I can edit everything but that. Feel free to do that for me.

 

The last of my files finally got up in Amazon yesterday. All the while, I kept checking on the server, saw zero crashes, but also hadn't configured any files. Today I added the biggest folder of them all, probably containing upwards of 100GB of data and tens of thousands of files, a brutal stress test for a previously-clumsy setup. While I'm SSH'd into the server, I have pinged the service a few times, I can see that not only is it still going, but it is also loading up the files as we speak. No thumbnails yet, but that might take a few days to process. Didn't exactly splurge on the hardware for this.

 

Honestly, I've been consistently impressed with how polished Emby is. Compared to really everything else out there like this, it's miles ahead of the competition. Five bucks a month is well-deserved pocket change for this. Looking forward to familiarizing myself with the more advanced features to get exactly what I want out of it!

Link to comment
Share on other sites

Or not, but it was fixed in the latest version:

 

  • Added additional fixes for Mono 4.4, specifically relating to the library scan

 

That's where it crashed. Upgrading and trying again! (And it just came out today too. Is there automatic crash reporting or something? I see nothing in the logs about this).

Link to comment
Share on other sites

If the server crashes and is able to catch the failure it will print it to the log and also created a separate log file prefixed with unhandled_

Link to comment
Share on other sites

If the server crashes and is able to catch the failure it will print it to the log and also created a separate log file prefixed with unhandled_

 

In other words, I've never had a recoverable error (never seen that log prefix). Interesting.

 

Question for you: the "Scan Library" process is at 15.1%. Browsing through the files, there's still zero thumbnails. When do those get generated?

Link to comment
Share on other sites

Got another crash. Looks like a relevant log entry near the bottom though from ffprobe. "Out of memory", which confirms my suspicion. Good news is that it recorded that. Bad news is that the two files recorded are 13.4 MB and 13.7 MB, so it shouldn't have run out of memory on that. I've got 1 GB of RAM on this machine, why is it crashing on a file only a few megabytes big?

 

server-63605942380.txt

Link to comment
Share on other sites

The service exits with an error code, making the site unresponsive. Still error 137 this time.

 

 

How do you define crash? the errors in that log are all recoverable.

 

See above for "crash" definition. As for recoverable:

 

 

ApplicationName='/var/lib/emby-server/ffmpeg/20160215/ffprobe', CommandLine='-i file:"/mnt/ext1/Cameras/Movie.AVI" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format', CurrentDirectory='', Native error= Out of memory

 

The very last bit of that has me thinking it's still not enough RAM. How much does emby need to run fluidly?

Link to comment
Share on other sites

Also adding a full screenshot of this in case it helps. Don't know that it will though.

post-146420-0-47178600-1470417031_thumb.png

 

Output from

 

sudo service emby-server status
Edited by shep
Link to comment
Share on other sites

well that's not emby crashing. that's an error coming from ffprobe which is somehow causing emby to fail as well. 1gb really should be fine but you could try bumping it and see if it makes a difference.

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