~/.kodi/temp cache files filling disk

Newbie here. I’ve Googled this problem and searched the forum without finding a solution, although I’m willing to admit I might not even know what search terms to use. It’s no doubt something trivial.

While playing or even pausing a movie resident on the internal disk of the Apple TV 1, a ~/.kodi/temp/filecache000.cache file of about 5-6 MB is created immediately followed by a filecache001.cache file that grows until I stop playing the movie. Unfortunately, there is less free space on the disk than the size of the movie, so once the free space has been exhausted, the movie stops. Trying to reboot results in a sad face icon because there’s no free space left on the disk.

I set this up for a relative and they were the first to notice because I never played a movie more than a few minutes. It’s running the latest version of OSMC with all updates applied (OSMC 2017.06-1, Kodi 17.3, 3.6 GB free disk before playing movie, updates turned off, relative has no network connection). I had played with a few different skins, but they’ve since been deleted without helping.

I’ve got the Settings in Expert mode, but I can’t see any setting that would allow me to stop this cache file from being created or growing. I don’t even know why it thinks it needs a cache file when the movies are all on the internal disk.

Some suggest an advancedsettings.xml file could be the culprit. I can’t find one in the Profile section and I sure didn’t create one.

So experts, tell me what dumb thing I’m missing. Thanks in advance.

Are you using streaming addons? I think there might be some caching here causing this

Good question. No streaming add-ons. I don’t recall adding anything other than trying a few skins. The relatives don’t have a network connection to the ATV1 at all, so there’d be no point. All media is local to the internal drive.

Ah – I skimmed that
Kodi is buffering to disk. We do this because of little free memory and most people have an internal disk install which is tolerant to sequential writing.

I suggest a bigger thumb drive if you’re using one

The OS is installed on the internal drive. No thumb disk. Are you saying I have to reserve enough free space for the largest media file on the disk (plus a little extra for general operations)?

Is there any way for the player just to play the internal file without creating the cache files?

I should also mention that when I got the ATV1 back from the relatives, there were several filecachexxx.cache files in the temp folder. I guess because they tried watching various movies without viewing to the end, or power-cycling to clear the hang, or whatever, resulting in multiple cache files being left behind. They do not have the technical ability to periodically clean out these files in cases of power failure.

Then you would buffer to limited amounts of RAM and probably crash.
The internal disk should be at least 40GB; having only 3.5GB free before watching doesn’t seem quite right; unless you’re storing media on the device as well which isn’t advised. Although: Kodi shouldn’t buffer local storage if that’s the case.


I didn’t realize it couldn’t play directly from the internal disk without creating a disk buffer. There’s only 66 MB of RAM free when not playing.

Yes, all media is on the internal 160 GB drive as they don’t have a network connection or even an external USB drive (and I’m not buying them one :slight_smile:).

Why isn’t it recommended to store media on the device? That’s the way the ATV1 was expected to be used with the supplied Apple s/w. If I’m using OSMC inappropriately, I guess I can always roll back.

It actually shouldn’t. This is an oversight. I think the problem is we currently buffer local and network streams. Try creating an advancedsettings.xml (nano ~/.kodi/userdata/advancedsettings.xml) and adding:

<?xml version="1.0" encoding="UTF-8"?>

Because if anything goes wrong or you reinstall OSMC, you could lose your data unless you remember where it’s stored

Thank you! That worked great. No more .cache files and free disk space doesn’t change. An SD movie plays fine without stuttering. It should be usable this way.

Losing the media on the ATV1 on a reinstall is not an issue as I have the originals stored elsewhere.

As background, the relatives don’t have the money for fast Internet, or streaming services, so I set them up with the ATV1. The idea of using their computer as the media server could be too much for them. I’ve even converted their old movies from VHS tape for them as their VHS player died (that’s what prompted me giving them the ATV1). The reason I chose OSMC over the native Apple s/w is that Apple’s s/w really had trouble with subtitles. They’re important because one of the relatives is nearly deaf. The file clearly contained subtitles and other media players had no trouble (VLC, Plex, QT Player), but the ATV1 didn’t even know they were there. OSMC has no trouble either.

So, I could fight with Apple’s s/w and subtitles, or go to OSMC. I’m learning. :blush:

You’ve been a great help. Thank you again for the quick reply.