Jump to content

Two emby and one nginx server balancing


igeoorge

Recommended Posts

igeoorge

Hi friends,

I noticed that when restarting the emby server, it clears the transcoding-temp folder and as the day progresses, the folder is repopulated.

Is there a way to change the path where these temporary files are saved?

Link to comment
Share on other sites

GrimReaper
4 minutes ago, igeoorge said:

I noticed that when restarting the emby server, it clears the transcoding-temp folder and as the day progresses, the folder is repopulated.

Is there a way to change the path where these temporary files are saved?

1681713974_Screenshot2022-01-02175806.thumb.png.9257968c9a298b7963e4520dc86ded48.png

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

igeoorge

friends, at the moment saving the transcoding files in another location is not possible.

Is there anything I can do to disable this or reduce file sizes?

Link to comment
Share on other sites

Happy2Play
1 hour ago, igeoorge said:

friends, at the moment saving the transcoding files in another location is not possible.

Is there anything I can do to disable this or reduce file sizes?

Until Emby changes it method of maintaining the entire stream session no.

You could disable transcoding/remuxing per user but then you will have uses saying why and I getting No compatible stream errors.

So you need as much spaces as you have transcoding sessions. 

  • Thanks 1
Link to comment
Share on other sites

pir8radio
2 hours ago, Happy2Play said:

Until Emby changes it method of maintaining the entire stream session no.

You could disable transcoding/remuxing per user but then you will have uses saying why and I getting No compatible stream errors.

So you need as much spaces as you have transcoding sessions. 

i think iptv creates transcodes in most cases too.. its hard to totally get away from. 

Link to comment
Share on other sites

Happy2Play

@Lukewill have to comment more on the error.

2022-01-10 20:53:02.920 Error GlobalExceptionHandler: UnhandledException
	*** Error Report ***
	Version: 4.6.7.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-rpm_{version}_x86_64.rpm
	Operating system: Linux version 3.10.0-1160.42.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Sep 7
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.InvalidOperationException: System.InvalidOperationException: Cannot process request because the process (31232) has exited.
	   at System.Diagnostics.Process.ThrowIfExited(Boolean refresh)
	   at System.Diagnostics.Process.EnsureState(State state)
	   at System.Diagnostics.Process.GetStat()
	   at System.Diagnostics.Process.get_StartTimeCore()
	   at System.Diagnostics.Process.get_StartTime()
	   at Emby.ProcessRun.CoreProcess.CoreProcessLocal.get_StartTime()
	   at Emby.ProcessRun.Extensions.ProcessCpuMonitor.TimerCallback(Object state)
	   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
	   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
	   at System.Threading.TimerQueue.FireNextTimers()
	Source: System.Diagnostics.Process
	TargetSite: Void ThrowIfExited(Boolean)
	
2022-01-10 20:53:02.947 Info Server: http/1.1 POST https://xxxxx.xxxxxxxxx.com/emby/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=0c3b9517-6890-4138-bee6-747439a10bdc&X-Emby-Client-Version=4.6.7.0. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
2022-01-10 20:53:02.949 Info Server: http/1.1 Response 204 to 191.240.175.5. Time: 2ms. https://xxxxx.xxxxxxxxx.com/emby/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=0c3b9517-6890-4138-bee6-747439a10bdc&X-Emby-Client-Version=4.6.7.0
2022-01-10 20:53:02.953 Info Server: Stopping HttpListener...

 

  • Thanks 1
Link to comment
Share on other sites

21 minutes ago, Happy2Play said:

@Lukewill have to comment more on the error.

2022-01-10 20:53:02.920 Error GlobalExceptionHandler: UnhandledException
	*** Error Report ***
	Version: 4.6.7.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-rpm_{version}_x86_64.rpm
	Operating system: Linux version 3.10.0-1160.42.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Sep 7
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.InvalidOperationException: System.InvalidOperationException: Cannot process request because the process (31232) has exited.
	   at System.Diagnostics.Process.ThrowIfExited(Boolean refresh)
	   at System.Diagnostics.Process.EnsureState(State state)
	   at System.Diagnostics.Process.GetStat()
	   at System.Diagnostics.Process.get_StartTimeCore()
	   at System.Diagnostics.Process.get_StartTime()
	   at Emby.ProcessRun.CoreProcess.CoreProcessLocal.get_StartTime()
	   at Emby.ProcessRun.Extensions.ProcessCpuMonitor.TimerCallback(Object state)
	   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
	--- End of stack trace from previous location where exception was thrown ---
	   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
	   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
	   at System.Threading.TimerQueue.FireNextTimers()
	Source: System.Diagnostics.Process
	TargetSite: Void ThrowIfExited(Boolean)
	
2022-01-10 20:53:02.947 Info Server: http/1.1 POST https://xxxxx.xxxxxxxxx.com/emby/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=0c3b9517-6890-4138-bee6-747439a10bdc&X-Emby-Client-Version=4.6.7.0. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
2022-01-10 20:53:02.949 Info Server: http/1.1 Response 204 to 191.240.175.5. Time: 2ms. https://xxxxx.xxxxxxxxx.com/emby/Sessions/Playing/Progress?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=0c3b9517-6890-4138-bee6-747439a10bdc&X-Emby-Client-Version=4.6.7.0
2022-01-10 20:53:02.953 Info Server: Stopping HttpListener...

 

Same thing we already discussed here: 

 

  • Thanks 1
Link to comment
Share on other sites

cul8rmom1
On 9/19/2021 at 1:36 PM, igeoorge said:

Hi friend, thanks for your feedback.

I'm not currently transcoding.
All are in direct reproduction.

At the moment the machine where the emby is has the following specification:
12 cpus
120gb of ram
Raid with 48tb
We don't have GPU

The use of this machine is still very small.
Cpu is no more than 30% usage.
The maximum memory that the emby came to use was 10GB.
But the average daily ram usage is 4GB.
Every day at 6:00 am the emby server is automatically restarted.
We do this in an attempt to lighten the emby and avoid problems.

We have an average of 250 simultaneous reproductions.

We are studying all possible scenarios and I think the cheapest and simplified scenario would be to just add another server and direct new users to it.

The problem I've been facing every night is with emby HTTP crashes.
The embyserver.exe service is still active, but it cannot be accessed.
When the emby http server goes down, all functions on the machine the emby is on are still active and working fine.

We believe that this problem in emby is due to the amount of reproductions, as the problem only occurs at night, when there are more simultaneous reproductions.

I'm in Brazil and my English is bad.
I'm using google translator. Sorry about that.
Thank you so much for your help. ❤️

Jeebus .. Not too shabby.  250 simultaneous is pretty good with a single machine.  I would be interested to know what bitrates the media is and what bitrate you are serving.  How much transcoding etc.

 

Instead of getting another server .. why not try some virtualization action and run multiple instances on one server?  I prefer VMware ESX but you could use the windows hyperV .. or you know do something silly and install VMware workstation and build a few VMs.

I am currently running 2 esx servers in a DRS cluster with around 80 total cores and 300GB of ram or so total…with multiple VMs running Plex and Emby as well as a few other things.

On a side note I would highly recommend buying a cheap quadro card.  Or a few. With 250 streams.  With only 30% cpu utilization you probably aren’t transcoding anything interesting.  If you did get a quadro card you could probably up the quality and stuff on at least some of the streams.

I am using Direct hardware access to let them Emby server hit the quadro card directly and use hardware transcoding.

 

Cheers,  (I’m going to read the rest of the thread now.)

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