Jump to content

multiple simultaneous transcodes of same file buries server CPU


Bingie
Go to solution Solved by Bingie,

Recommended Posts

Bingie

Hi,

I know this is more of an incorrect usage problem, but my mom is 83, and she forgets which buttons to press, so she'll keep mashing the same buttons over and over.

When she starts to play a movie or show in Emby, the server begins transcoding the whole file.  This takes a while, keeping the server CPU busy the whole time.

She immediately hits home key (roku client) which jumps back to roku menu, starts emby again, scrolls down to last movie/show, starts it, then hits home key, and starts over.  She'll do this over and over again for an hour, until I take the remote out of her hand and play it for her, but by then, it's too late.  The emby server has a dozen processes running, all transcoding the same file.  Just one process pushes the cpu to 70%, but after a few, the server becomes unresponsive, can't even kill the processes, have to hard hit the power button to force a windows reboot.

Anyways, I was hoping the devs might be able to block transcoding the same file more than once?  Maybe use a previous transcode of the file if it already exists, or already started?

I know we're probably the only ones that would benefit from this features LOL but it would certainly be appreciated!  I was forced to remove all HD files because of this.  It's an undesirable solution, but the only one available to us.

Thanks

 

Link to comment
Share on other sites

Q-Droid
1 hour ago, Bingie said:

When she starts to play a movie or show in Emby, the server begins transcoding the whole file.  This takes a while, keeping the server CPU busy the whole time.

What does the above mean?

1. Does it begin streaming the video in normal playback or do you have to wait for it to begin? How long does it take?

2. Is it really transcoding the whole file or just enough to stream and buffer as it should?

The rest is likely about Roku behavior and how playback should be started/stopped when using those devices.

 

Link to comment
Share on other sites

Bingie

Hi,

When my mom's delirium kicks in, she doesn't know what she's doing.  She is impatient, so thinks if she keeps pressing buttons, it will play.

Yes the streaming starts, but less than a second later, she has already left the screen and started the emby client again.

As to whether the server transcodes the whole file or just the first buffered part, sorry, honestly I don't know, but the process continues to run, then the next process gets started and runs, and the next, and the next.  I've seen up to 8 processes running at the same time, all transcoding the same exact media file.  Did the first ones finish?  Sorry, I don't know.

Maybe one fix would be if you launch emby on the roku client, any former files/processes from that client should be closed/stopped?  The server continues to transcode the file, even though the client has restarted.

Sorry if this isn't clear, I know, it's an unusual situation.  She can't help it.  I'm trying to encourage her to keep doing as many things for herself as possible.  Senior citizens slowly lose the ability to do things for themselves, it's heartbreaking for me, but very frustrating for her, to the point she will just stop trying and give up.  Physically she's probably good for more years, but mentally, I don't know.  I'm worried.  I'm hoping she can continue to watch tv on her own.  I don't want to have to change the channel every time she wants to watch something else, but that day is coming.  Using Emby is one of the few things left my mom can do for herself.

Thanks

 

Link to comment
Share on other sites

Quote

I've seen up to 8 processes running at the same time, all transcoding the same exact media file.  Did the first ones finish?  Sorry, I don't know.

Hi, its best to look at a specific example:

Thanks.

Link to comment
Share on other sites

Bingie
2 minutes ago, Luke said:

Hi, its best to look at a specific example:

Hi Luke,

It's hard to grab specifics like screen shots when the server is frozen to the point the interface is completely locked up, have to hit the power button.  As for logs, sure I'll try to go find some.  When my mom's delirium is kicking in, I don't exactly have time to leave her to go document the problem, but I'll try next time.

Thanks

 

Link to comment
Share on other sites

Q-Droid
11 minutes ago, Bingie said:

Sorry if this isn't clear, I know, it's an unusual situation.  She can't help it.  I'm trying to encourage her to keep doing as many things for herself as possible.  Senior citizens slowly lose the ability to do things for themselves, it's heartbreaking for me, but very frustrating for her, to the point she will just stop trying and give up.  Physically she's probably good for more years, but mentally, I don't know.  I'm worried.  I'm hoping she can continue to watch tv on her own.  I don't want to have to change the channel every time she wants to watch something else, but that day is coming.  Using Emby is one of the few things left my mom can do for herself.

It's clear and likely a combination of things. Rokus were (maybe still are) known for causing problems when the streams are not stopped a specific way thus leaving active sessions on the server. I don't use Roku so don't know if this is still a problem.

Let the devs review your logs.

In the meantime you can set a user level limit for simultaneous streams on the server. You can keep yours from reaching too many IF the runaways are tracked. If they become detached then the limit might not work.

 

  • Thanks 1
Link to comment
Share on other sites

Bingie
2 minutes ago, Q-Droid said:

you can set a user level limit for simultaneous streams on the server

Really?  Per person/client?  Should set limit to just 1 stream by default for each client.  When limit is reached, either prevent starting a new one, or ask to terminate the old one?  That would certainly do it.

As for logs, they won't showing any errors, Emby is performing dutifully as designed.  The logs will just show a list of transcodes starting, up to the point of server reboot.  It's not a bug we're tracking down.

I'm curious about that stream limiting, that sounds like a possible easy fix.  That would be great.

Link to comment
Share on other sites

  • Solution
Bingie
12 minutes ago, Q-Droid said:

you can set a user level limit for simultaneous streams on the server

Found it!  I set it to just 1 stream for each of us, so I can start testing on my roku.  I'm hoping this will do it.

Great idea!

Thanks

Link to comment
Share on other sites

Bingie

"Your account as exceeded the maximum streaming limit set by your Emby server administrator.  Please contact them for assistance."

Works!  Tested on my roku.  Started a movie, immediately switched back to roku, started emby again, started the same movie again.  Got a popup.

The next time her delirium kicks in, this will stop her, and she will probably yell for me, and that's fine.  I can take it from there.  Maybe I should up the limit to 2 or 3.  I'll do more testing.

Thanks @Q-Droidthis is a good fix.  I can put the HD movies back on! YAY! :)

  • Like 1
Link to comment
Share on other sites

Q-Droid

If anything this can help you manage the server load and even if you set a higher limit it will stop adding streams well before you have no choice but to reboot. If the server is still responding then you should be able to stop/kill the sessions that aren't really streaming.

 

 

  • Like 1
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...