Jump to content


Photo

Emby consumes almost all memory


  • Please log in to reply
17 replies to this topic

#1 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 18 May 2019 - 04:39 PM

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.



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 18 May 2019 - 04:46 PM

Hi there, can you please attach the emby server log? thanks.



#3 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 18 May 2019 - 05:48 PM

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

 

-removed logs-


Edited by BlueSnake, 18 May 2019 - 07:18 PM.


#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 18 May 2019 - 06:11 PM

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.



#5 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 18 May 2019 - 06:36 PM

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.



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 18 May 2019 - 06:41 PM

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

#7 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 18 May 2019 - 06:52 PM

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.



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 19 May 2019 - 01:48 AM

How are you importing that live tv into Emby?



#9 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 19 May 2019 - 02:01 AM

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)

 

 

Attached Files


Edited by BlueSnake, 19 May 2019 - 03:34 AM.


#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 19 May 2019 - 02:05 AM

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.



#11 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 19 May 2019 - 02:14 AM

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, 19 May 2019 - 02:15 AM.


#12 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 19 May 2019 - 02:52 AM

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.



#13 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 19 May 2019 - 03:10 AM

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



#14 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 19 May 2019 - 03:18 AM

@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?



#15 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 26 May 2019 - 03:43 AM

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.

 

 

 

 

Attached Files



#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 29 May 2019 - 01:32 PM

I would suggest trying again with the next release. Thanks.

#17 BlueSnake OFFLINE  

BlueSnake

    Member

  • Members
  • 22 posts
  • Local time: 04:11 AM

Posted 03 June 2019 - 02:35 AM

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.



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 129305 posts
  • Local time: 10:11 PM

Posted 03 June 2019 - 11:45 AM

Hi, yes this has been improved for the next release. Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users