Kodi Community Forum

Full Version: Cache not re-filling
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear all,

I am a happy Kodi user, but I am having some small problems lately.
When playing a movie, OpenElec would freeze at random moments. Sometimes after 10 seconds, sometimes after 10 minutes.
I guessed it was a buffering problem & added the cache lines to my advancedsettings.xml
To kick off: my network:
Gigabit router -> Gb Switch -> Gb Switch -> NAS - Desktop - HTPC.
So my complete network is 1Gbps & all my devices are connected via wire.
Internet connection is 200Mbps down / 20 Mbps up (not that I think it matters in this case)

HTPC: 4GB ram, G3258, OpenElec 7.0 beta 3 (latest version)
Desktop: 16GB ram, 4670K, Kodi 16.1 (latest version)

Advancedsettings.xml
Code:
<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>192.168.0.191</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.0.191</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
  <network>
    <buffermode>1</buffermode>
    <cachemembuffersize>1073741824</cachemembuffersize>
    <readbufferfactor>50</readbufferfactor>
  </network>
</advancedsettings>

As you can see, I am using a buffer of 1GB, 50x read buffer factor & buffering everything.
When I start playing a video, the cache fills up nicely, but stops filling at 500MB, and then just starts to empty without refilling.
Once it is close to 5MB the VQ en AQ start dropping in %, en when 0MB is reached, it just stops playing and goes back to the home screen.

I tought I did something wrong, and copied the example 4 from here.
So if I understood correctly, Kodi should buffer untill 150MB, but use 450MB ram.

After some tests (on both HTPC & desktop), it seems that Kodi fills its cache to 65MB and then falls back to 56MB. It averages between 56.19 and 56.25MB.
Image

So 2 major questions:
- Why is it not refilling its cache when set to cachemembuffersize of 1GB
- Why is it only filling to 65MB & then falling back to 56MB instead of the 150MB

Minor question:
- Why is it saying 'forward' instead of 'cache'?

Thanks in advance.

With kind regards,
Do you exp the same problem running the latest stable build of OPENELEC? Mods may want to move this out of the "Windows" thread, unless this issue is also on his/her desktop, running Windows?
Yes it is also happening on the stable build of openelec.
As is on my (his Wink) desktop with latest stable kodi client.

Btw, if it was not clear, my nas is my source.

I am using the exact same advancedsettings.xml on both devices.

Thanks
Post up a Debug Log when it happens again. I had a similar experience a few years back, but I don't remember the root cause.
I'm sorry it took me this long, but I was 'out of office' Smile

http://pastebin.com/ift5EyuL

The only errors I see, are the errors that come from the 'Kodi Log Uploader'
But then again, I'm not the expert here Wink

Thanks a lot!

EDIT: I ran another Debug Log 'session'. This time the cache was emptied & the stream stopped playing.
Please find it here: http://pastebin.com/zSnssKWr
I am kinda stumped my friend. You definitely do not have a speed problem with the setup you are running. I am still noobish myself when reviewing log files, so nothing really stood out to me. Did you modify your advancedsettings.xml to begin with? Anyone else know what his problem could be?
Well, I did post my advancedsettings.xml in OP Smile

The weird thing is that I am using this setup, with this advancedsettings.xml since over 5 years without ever encountering this problem...

I hope someone can help me
Interesting. Yeah I saw the file in the OP, but since I have never modified mine, I did not know if that was the default settings or not. But if you have been running it that way in the past with no issues, don't see why it would change now. What if you reset your advancedsettings file to the default?
(2016-06-30, 15:21)JxPx Wrote: [ -> ]Interesting. Yeah I saw the file in the OP, but since I have never modified mine, I did not know if that was the default settings or not. But if you have been running it that way in the past with no issues, don't see why it would change now. What if you reset your advancedsettings file to the default?

Well, I need the part about the video stuff, or else it doesn't detect my library.
The rest is purely buffer related

Edit: I am now checking my nas for bad blocks/problems. I will also see if there were some big changes on it that could have impacted performance.

EDIT: NAS did not show performance impact.
I tested again with the <network> settings removed in advancedsettings.xml. The client just stops playing after a random time (between 30 seconds or 30 minutes).
I am seeing the same problem on my desktop & my HTPC. Windows 10 & OpenElec.

Very Annoying bug.