Jump to content

Emby for Kodi on fsTV4k memory leak?


Pistolero
 Share

Recommended Posts

Pistolero

Hi all,

Emby is killing my Kodi and my clock!

I use a rooted Amazon fire TV 4k stick with an Ethernet USB adapter running Kodi 18.7.2 and the latest Emby addon. I also run this translucent clock app. So, I start Kodi, wait for Emby to welcome me, and start playing Das Boot. About 5 minutes into the gunfight the clock will go kaput. Couple of minutes later, video will stutter, then stop, then Kodi will go kaput as well. The clock vanishes at 85% memory usage, and Kodi itself will die at 89%.

If I disable the Emby addon, and restart Kodi, then memory usage, as reported by Kodi itself, will hover around 70%. The clock stays put, and not kaput ūüėä. This is a bummer because, while I can get new data into the DB by syncing on another box and then copying the DB files, I cannot sync watched status.

Would a COVID-19 coding hero look into this memory usage and some way to reduce it? As it stands right now I either use EmbyCon, or I enable and disable the addon to get syncs.

Could you please make it so its memory footprint is friendlier to small devices?

Lastly, what other data can I get you from my system? Any logs?

Thank you!

F.

 

 

Link to comment
Share on other sites

Pistolero

Guys, thank you for the replies!

Kodi and Emby run like champs on all my Windows boxes. Love EmBy and I wish I could afford a license, it is that good.

The issue I have is the increase in memory usage whenever the Kodi Sync addon is enabled on a 1.2GB of RAM FireTV Stick 4k. It’s nothing dramatic… but like I said before, enough to take down Kodi (89%) along with my clock overlay (85%). This was a sporadic problem, but this weekend it got to the point where I could only watch about 10 minutes of a high-quality 1080p video before the crash. This makes me suspect that my DB is now too big for the stick? Does that make sense? Does the EmBy addon load the videos DB into RAM? I also noticed that if I disable EmBy and restart Kodi, I can then play any file without crashes, using the very same EmBy DB. And my clock then stays running.

Now I’m using Embuary with EmbyCon. Aside from the inherent slowness, my clock overlay still sometimes decides to go out to lunch… but Kodi never crashes. Memory usage never goes above 86%.

I tried a few of things before posting… cleared Kodi data, removed the data folder, and reinstalled it, with only EmBy. Still killed it. Tried freezing a bunch of apps, uninstalling others, tried Greenify, Background Restrictor, ADB commands, nothing could bring the memory usage down in Kodi other than disabling the EmBy sync addon.

Please let me know how I can help in tracking this down.

 

Francisco.

Link to comment
Share on other sites

On 7/7/2020 at 2:41 PM, Pistolero said:

Guys, thank you for the replies!

Kodi and Emby run like champs on all my Windows boxes. Love EmBy and I wish I could afford a license, it is that good.

 

The issue I have is the increase in memory usage whenever the Kodi Sync addon is enabled on a 1.2GB of RAM FireTV Stick 4k. It’s nothing dramatic… but like I said before, enough to take down Kodi (89%) along with my clock overlay (85%). This was a sporadic problem, but this weekend it got to the point where I could only watch about 10 minutes of a high-quality 1080p video before the crash. This makes me suspect that my DB is now too big for the stick? Does that make sense? Does the EmBy addon load the videos DB into RAM? I also noticed that if I disable EmBy and restart Kodi, I can then play any file without crashes, using the very same EmBy DB. And my clock then stays running.

 

Now I’m using Embuary with EmbyCon. Aside from the inherent slowness, my clock overlay still sometimes decides to go out to lunch… but Kodi never crashes. Memory usage never goes above 86%.

 

I tried a few of things before posting… cleared Kodi data, removed the data folder, and reinstalled it, with only EmBy. Still killed it. Tried freezing a bunch of apps, uninstalling others, tried Greenify, Background Restrictor, ADB commands, nothing could bring the memory usage down in Kodi other than disabling the EmBy sync addon.

 

Please let me know how I can help in tracking this down.

 

 

 

Francisco.

 

HI, can you try to narrow down the situations when it happens and when it does not? Thanks !

Link to comment
Share on other sites

Pistolero

Hey Luke,

Thank you for the reply. Pretty much it happens as described. Been running Embuary with Embycon and it's been working like a champ. Are there any logs I can gather?

 

F.

Link to comment
Share on other sites

  • 4 months later...
TobyTentakel

The problem lies in the Emby for Kodi plugin, as you might have guessed since it works just fine with Embycon.

Like other users, I have been experiencing the same on various pieces of hardware, in most cases a Pi 3, so I haven't been able to use Emby for Kodi for months.

Seeing as the evil clone project already fixed it, it should not be too complicated to apply the patch in the E4K plugin as well. I'll probably ask Angelblue05, or do it myself.

Edited by TobyTentakel
Link to comment
Share on other sites

quickmic

Well not sure if there is a memory leak or just consuming lots of ram due to design.

If I sync my music database (quite large), 2GB is not enough.

@TobyTentakel , I've send you a PM

Link to comment
Share on other sites

TobyTentakel

Yes, the problem is down to low memory in the first place, that is correct, it is not a leak, "just" high memory requirements. The problem is with devices with low memory, like the Pi 2 or 3, which usually only have 500-700MB after a clean reboot, this won't be enough to handle a sync with the server, it will crash after a short while, so the whole plugin is unusable here.
A short-term solution is to create a swapfile on the SD card to temporarily increase memory size, although that is usually so slow that the sync process can take ages. The better solution is within the plugin to wait with new requests until the current ones have been processed, so they don't get queued in memory.

Edited by TobyTentakel
  • 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
 Share

×
×
  • Create New...