Jump to content

Emby Server hogging 100% CPU


Recommended Posts

thefranklin
Posted (edited)

Occasionally, and usually when my computer wakes up, Emby uses 100% CPU and is unreachable during this time.  I have to kill the process and restart the server, then it works fine.   My cpu is an AMD x3 720, not new but also not especially weak for this service.

 

I would like to say it has something to do with a media scan upon waking.  It is very possible I am not being patient enough and let it finish, but I get "host unreachable" error trying to access Emby from a browser on the same machine when it is using 100% cpu.  It also really slows my machine down, rendering it pretty useless.  I have my machine set to wake at the same time every night and don't often get on the pc with the server or stream from Emby, so I cannot answer if it is something that happens every time.  I do notice it when I am attempting to use this pc and manually wake it.

 

I have attached a server log file from today when I killed it manually.  it looks like it started a scan, then my pc went to sleep. 

 

There as been another issue where Emby will use 100% of an entire core at idle.  This seems to have stopped in the last week and a half.  Thanks to whomever fixed that!

 

Edit: Added attached file.

server-63583142400-log.txt

Edited by thefranklin
thefranklin
Posted

This morning Emby server was hogging up two cores when I checked on it starting at about 5 am.  I did not wake my computer, it was on when I checked on it.  I have it set to sleep half hour after activity, so when I wake up in the morning it should be asleep.

 

powercfg -lastwake and

powercfg -requests

both come up empty.

 

The server has been loaded at 66% for 45 minutes.  No attempt to connect to Emby has been made in the last 12 hours.  The web server shows active devices from 6 hours ago, and a half hour ago.  The first one is the nexus player, which has been untouched in the last 12 hours, and the second one is my cell phone which is just plugged in and charging.  I am able to open up an instance of Emby in my browser, so it is responding now.

 

 

I kill it, restart it, and we are fine now.

 

server-63583228799 - log2.txt

server-63583249794 - log3.txt

thefranklin
Posted (edited)

I manually woke my pc this morning and got the same issue of 100% cpu usage and non-responding server.

 

I took the screenshot at 5:40, so it had been in this state for 35 minutes.  I don't think it is going to recover :(

 

I restarted the server and all is well again, no cpu usage at all.  It is using close to 138k of memory.

 

is it possible that Emby server is trying to access the interwebs before my pc has woken up my internet connection?  I see a huge lag time in there at 504.

 

Thanks,

server-63583508668 - log -restart.txt

server-63583495202 - log-crash.txt

post-4867-0-79061500-1447933701_thumb.png

Edited by thefranklin
Posted

Not sure if it is relevant but what lives at this address?  192.168.1.154

 

It looks like it requested video playback at 5:03.

thefranklin
Posted (edited)

Actually, that IP doesn't show up as a name in my routing list, just an asterisk, so not sure.  I woke my computer up at 503, nothing would have been requesting anything at that time of day.

 

The same thing sort of happened in the first log I posted at 00:17 from IP 177.  Nothing would have requested any playback at that time.

Edited by thefranklin
  • 2 weeks later...
thefranklin
Posted (edited)

So, with this using all my cpu, I can't even use plex, either.

 

Another log, wth is this thing doing?  Tried to play stuff at 20:30 through plex and nada.  Mediabrowser from a firetv can't find my server, and I also cannot log onto it via my browser.  Had to restart.

 

After restarting, no cpu problem.  I am able to start watching something.  What is the difference this time?

server-63584618419.txt

server-63584685544.txt

Edited by thefranklin
Posted

So, with this using all my cpu, I can't even use plex, either.

 

Another log, wth is this thing doing?  Tried to play stuff at 20:30 through plex and nada.  Mediabrowser from a firetv can't find my server, and I also cannot log onto it via my browser.  Had to restart.

 

After restarting, no cpu problem.  I am able to start watching something.  What is the difference this time?

 

If you customized your scheduled task intervals, try removing your customizations.  It looks like the server is going crazy firing scheduled tasks repeatedly. Look at the timestamps. The defaults for each of those are every 12 hours.

2015-12-02 19:21:31.7362 Info - App: IntervalTrigger fired for task: Scan media library
2015-12-02 19:21:31.7362 Info - App: Queueing task RefreshMediaLibraryTask
2015-12-02 19:21:33.4054 Info - App: IntervalTrigger fired for task: Check for application updates
2015-12-02 19:21:33.4054 Info - App: IntervalTrigger fired for task: Check for plugin updates
2015-12-02 19:21:33.4054 Info - App: Queueing task SystemUpdateTask
2015-12-02 19:21:33.4054 Info - App: Queueing task PluginUpdateTask
2015-12-02 19:22:32.7791 Info - App: IntervalTrigger fired for task: Scan media library
2015-12-02 19:22:32.7791 Info - App: Queueing task RefreshMediaLibraryTask
2015-12-02 19:22:34.5731 Info - App: IntervalTrigger fired for task: Check for plugin updates
2015-12-02 19:22:34.5731 Info - App: Queueing task PluginUpdateTask
2015-12-02 19:22:34.5731 Info - App: IntervalTrigger fired for task: Check for application updates
2015-12-02 19:22:34.5731 Info - App: Queueing task SystemUpdateTask
2015-12-02 19:23:33.9156 Info - App: IntervalTrigger fired for task: Scan media library
2015-12-02 19:23:33.9156 Info - App: Queueing task RefreshMediaLibraryTask
2015-12-02 19:23:35.7876 Info - App: IntervalTrigger fired for task: Check for application updates
2015-12-02 19:23:35.7876 Info - App: Queueing task SystemUpdateTask

thefranklin
Posted

Thanks for the quick response!

 

I have not customized any of the task intervals. There is one trigger set every 12 hours for scan library. 

 

I tried deleting it and adding a trigger, but I apparently can't add any triggers.  I just get a spinny circle when I hit apply.  Edit: stupid special time format. 

 

So does Emby when these things are supposed to happen and fire them off upon wake?  I have my computer wake at the same time every day, so it shouldn't ever have more than one of the other stuff that default to every day.  Now I don't check for certain that it is awake every single time, but it has been awake every time I have tried it for quite a few months.

Posted

Hmm, maybe it's firing a backlog of triggers. You might want to consider removing some of the periodic triggers and setting your own based on your usage pattern.

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