Jump to content

Emby consumes almost all memory


BlueSnake

Recommended Posts

BlueSnake

Hi,

 

today I've observed that accessing Emby via the iPhone app was very slow and no image was loaded at all. After logging-in into my Synology, I've figured out, that the Emby process cosumed 4.5 GB of the 6 GB, installed in my DS218+.

 

After restarting Emby, this issue was gone. Restarting took several minutes, because the UI was loading extremely slowly.

 

Installed Emby version: 4.1.1.0

 

 

 

Unfortunately the server log is more than 200 MB big, so I cannot attach it.

Link to comment
Share on other sites

BlueSnake

Zipping the logs works to be lower than the max upload size. See attachment.

 

-removed logs-

Edited by BlueSnake
Link to comment
Share on other sites

Hi, what is your live tv source? Basically it is going in a loop repeatedly opening connections to your live channel url, then i guess the response has no data, so it does what it's supposed to do and closes and reconnects. The only problem is that it does this over and over.

Link to comment
Share on other sites

BlueSnake

The live tv source is an Enigma2 cable receiver, running on openAtv 6 with installed HRTunerProxy plugin. I've also seen these opening connections and asked me whether this behavior is really as intended.

 

http://192.168.176.8:8001 is tried to be accessed, but the port isn't correct, I guess. At least the streaming port and the WefIf ports are different than 8001.

 

Emby server was running for at least one week until the issue occurred.

Link to comment
Share on other sites

So if you don't use live TV then I imagine there's no problem, right?

Link to comment
Share on other sites

BlueSnake

Without live tv there is no problem.

 

Even after the server restart, live tv is not a problem. Emby doesn't try to access the port 8001. So I wonder why emby did try to access this unused port before restarting. Maybe the issue occurs in a few days again. I will observe this.

Link to comment
Share on other sites

BlueSnake

The HRtunerProxy plugin is running on the Enigma2 receiver. This is then added as a HD Homerun with IP 192.168.176.8:6081 in emby. This was working fine with Emby 4.1.0.26.

 

Atteched you find logs where seemingly the issue of accessing port 8001 of ip 192.168.176.8 (Enigma2 receiver) starts. (around 10:00 am in the logs)

 

 

post-449791-0-25943900-1558245852_thumb.png

embyserver_2019-05-19_00-00.7z

Edited by BlueSnake
Link to comment
Share on other sites

Well the retries causing memory problems are something we can fix, but that won't actually make the live tv playable and that i'm not yet convinced is any problem in the server. that just looks like the url returning no data.

Link to comment
Share on other sites

BlueSnake

Live TV is working. I'm able to record movies, shows and watch Live TV. There is no issue at all.

 

The only issue is that Emby server is trying to access the port 8001 of my Enigma2 receiver, but the port is not used at all. So the question is why Emby tries to access this port.

 

I will update the Enigma2 software and also the HRTunerProxy plugin. I will also update to the latest Synology DSM 6.2.2.

Edited by BlueSnake
Link to comment
Share on other sites

I can't really answer that, sorry. If it's mimicking an hdhomerun tuner then the channel urls the server is using is what came out of the hdhomerun (mimicked) api.

Link to comment
Share on other sites

BlueSnake

Maybe it is a HRTunerProxy issue. I've found the following explanation regarding port 8001, unfortunately in german:

 

- Hinter dem Port 8001 lauert der streamproxy, der die TS-Daten per HTTP-Stream bereit stellt. Dieser muss, bevor er Daten senden kann, in Enigma2 einen Tuner reservieren. Daher...
- ruft der streamproxy kontaktiert unter der URL http://127.0.0.1:80/web/stream…:6DCA:44D:1:C00000:0:0:0: dann wiederum Enigma2 und reserviert eine Aufnahme (Streams werden intern in E2 wie Aufnahmen behandelt) und am 8001 bereit stellt.

 

my translation:

- port 8001 is used by the Enigma2 streamproxy, which provides the TS data via HTTP stream.

 

So it is strange, since recording and live tv is working, but the memory usage of Emby increases. I didn't observe this with Emby server 4.x.x.26

Link to comment
Share on other sites

BlueSnake

@@andyblac644

 

Since you're the developer of HRTunerProxy, maybe you are aware of this behavior or know how to figure out, whether your plugin has an issue or not?

Link to comment
Share on other sites

BlueSnake

New finding: Seemingly this happens ever 7 days. The issue occurred at 02:26 am again.

 

There is only one scheduled task which runs at 2:00 am, but I don't think that this one leads to the issue.

 

I've just updated openATV and the HRTunerProxy plugin on the Enigma2 receiver. So nothing changed. The Synology NAS has not been updated to 6.2.2. It was running on 6.2.1.

 

It seems that allocating more and more memory by emby server happens during about 3 days. I've observed that on friday 1.7 GB memory have been allocated, on saturday 2.7 GB and this morning 4.3 GB.

 

 

 

 

emby-log_2019-05-26.txt.zip

post-449791-0-03062400-1558856482_thumb.png

post-449791-0-19796200-1558856498_thumb.png

post-449791-0-89670600-1558856510_thumb.png

Link to comment
Share on other sites

BlueSnake

I found the reason which causes this issue:

 

Precondition:

- no tuner available. Means that all tuners are blocked by ongoing recordings.

 

Use case:

- create a new recording within a time-slot where all tuners are blocked by recordings. So emby would need one additional tuner.

 

Observed:

- Emby server tries to get access to an available tuner, but all are in use.

- Them emby server starts to retry a connection, to a tuner which is already in use, every few milli seconds.

 

Potential bugfix:

- Maybe try whether a free tuner is available, not every few ms, but e.g. every minute or every 30 seconds.

 

 

So the issue is caused by the extremely high rate of retries.

Link to comment
Share on other sites

  • 5 months later...
ricardonr

Hi,

 

I'm having the same issue with my DS418 (DSM 6.2.2-24922 Update 4).

 

I've waited for emby's last release 4.3.0.30 but the issu is still there.

 

Since I'm only testing, I only have 10 movies and the default plugins.

 

The memory usage is arround 70% when in idle mode, mono is using arroung 900MB.

 

I also have ple installed to test and it's memory usage in the same conditions is much lower, arroun 100MB.

 

Thanks

 

 

Link to comment
Share on other sites

ricardonr

Hi,

 

I'm having the same issue with my DS418 (DSM 6.2.2-24922 Update 4).

 

I've waited for emby's last release 4.3.0.30 but the issu is still there.

 

Since I'm only testing, I only have 10 movies and the default plugins.

 

The memory usage is arround 70% when in idle mode, mono is using arroung 900MB.

 

I also have ple installed to test and it's memory usage in the same conditions is much lower, arroun 100MB.

 

Thanks

 

Any updates??

 

The server sometimes becomes irresponsive due to the memory allocation to mono.

 

Thanks

Link to comment
Share on other sites

ricardonr

Hi Luke,

 

Just one user and only 10 movies and the original plugins. No extra packages on synology as well. I'm only using it for emby. I've also uninstalled plex.

Link to comment
Share on other sites

ricardonr

Hi Luke,

 

I've been testing the premiere license so I have instaled and uninstalled some plugins and added a couple more movies.

 

Yesterday the memory didn't go over 50%, but from the evening it has been in 80%.

 

Thanks,

embyserver_2019_12_04_2014.txt

Edited by ricardonr
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...