Solved PC internal memory fills up
#1
I've been using Kodi 16 on my Amlogic android media box for months without any problems.

My pc functions as media source and both my media box and pc are on a local wired ethernet network.  

Suddenly this week my pc's internal memory (8Gb RAM) is slowly filling up while Kodi is playing any content on my tv. 

When I stop playing this content, the memory remains as full as it is, it's not becoming available again, until I reboot the pc. If I don't stop watching, the pc will eventually crash (BSOD)

For example, a 40Gb movie with a 140min duration takes about 13 minutes to fill up my pc's memory. 13/140 * 40Gb = 3.6 Gb. Considering my Windows pc uses about half the available memory, adding this 3.6Gb would fill up the memory to the 8Gb total. Basically meaning that all the content that's been played has been put into my pc's memory as well....

Just to be clear, it's not the memory of the media box that's the problem, it's the memory of the pc... The pc should only function as a media source and not do anything else, so I don't get why its memory fills up...

Any idea what causes this problem and how I could fix it?

Help would be greatly appreciated!
Reply
#2
What OS is running on your PC, and how are you sharing the media with Kodi? SMB? NFS? UPnP?

How are you measuring the memory usage on the PC?
Reply
#3
Thanks Yasij, for responding.

My PC is running Windows 7 Ultimate 64bit, sharing to the media box via SMB.

I'm using the Performance tab on the Windows Task Manager to measure the memory usage on the PC.
The bar resides at 3.2 GB out of the 8 Gb, while only running Chrome and some background apps.
While playing something on my media box with Kodi, the bar slowly fills up until it crashes my PC.
Reply
#4
Kodi on an external android box, or any other OS, has no control over how your Win7 SMB server is to behave internally. So if there is something filling up its internal memory, then I'd say it is an internal Windows 7 memory leak which may have begun with the change from SMBv1 to SMBv2. I seriously doubt any "outside interference" such as Kodi will have anything to do with that.

You could try using NFS as a file server protocol instead, but I have never heard yet of a SMB memory leak in Windows, 7, 10 or otherwise. Perhaps one of your recent Windows updates has gone wrong?
Reply
#5
It's potentially the leak mentioned in this Windows update: https://support.microsoft.com/en-us/help...-kb4093118 .

"After installing KB4056897 or any other recent monthly updates, SMB servers may experience a memory leak for some scenarios. This occurs when the requested path traverses a symbolic link, mount point, or directory junction and the registry key is set to 1:  
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanManServer\Parameters\EnableEcp"

Have you installed the latest Windows updates? It was supposed to be fixed in a May patch.

The reason I asked how you were measuring memory usage was because OSes cache disk reads in memory. So as you read files from disk, it will load in memory to speed up future accesses. Sometimes this shows up in the tool you are measuring, but since it is cache, it shouldn't cause a crash. The OS will reuse the memory if it is needed for something else.
Reply
#6
I took your advise and installed the latest Windows Updates, including the August Win7 Monthly Quality Rollup.

Too bad it doesn't fix anything...

When I'm playing the content on my pc itself, the memory doesn't fill up.. it only happens when I'm using my Kodi box with a SMB connection.

Any other suggestions about fixing this leak?
Reply
#7
Try up with the latest version which comes up with the security patches, but beside make sure to disable firewall for that moment.

With Regards,
Xovo Larjem
Reply
#8
You mean the latest Kodi build?

I don't think my media box supports builds after 16.1...

I did install Plex media server on my pc right before this problem started occurring, to stream to the bedroom tv. Any chance that would cause the problem?
Reply
#9
For anyone with the same problem, I managed to solve it.

I installed Windows update KB4103712, which was not directly mentioned on Windows Update, but was hinted at another forum as a possible solution.

And, I added "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 to the registry to disable SMB2, (Value 1 enables it)

Just managed to watch an entire movie on my media box while my PC remained at a low memory usage level.
Reply
#10
Thanks for getting back to us on this issue, let's hope that helps others too.

Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
PC internal memory fills up0