34

Couple of servers that have been rebuilt recently are hitting warnings on C:\ drive usage. Looking at the disk there are GBs of data in Windows\Temp being used up by cab_XXXX_X (e.g. cab_5328_2). The suggestion I have found online is to just delete them but I can't help but feel this is only going to prove to be a workaround as they are being generated multiple times a day.

Has anyone seen this behaviour before with a Windows Server 2008 R2 SP1 box? I can't see it happening on any other server that we have, only the two that have been rebuilt recently. Am hoping to find a permanent way to stop it as I am sure it cannot be helping performance.

  • 1
    I would recommend using [Process Monitor](https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx) to see which process or service is creating these files, hopefully you'll be able to catch one in the act. Then we can determine how to proceed once we know how they are getting there in the first place. – vcsjones Jan 05 '16 at 15:14
  • 1
    The question (and the answer) are perfectly valid for Windows 7 also. – Borislav Ivanov Feb 17 '16 at 20:57

3 Answers3

27

I had a similar issue a while ago, this helped to identify the cause. This is the bit with the fix.

in C:\windows\Logs\CBS folder delete the oldest .log file (you can also delete them all) in C:\windows\temp folder delete every cab_xxxx in the following regeneration process, the remaining (CBS) logs where zipped correctly, and C:\windows\temp was left clean

Tim Brigham
  • 15,545
  • 10
  • 75
  • 115
  • 3
    And [here](http://felixyon.blogspot.bg/2013/03/mysterious-cab-files-fill-up-temp-folder.html) is a much more technical description of the issue. It seems that [Windows Resource Protection](https://msdn.microsoft.com/en-us/library/windows/desktop/cc185681(v=vs.85).aspx) is the service to blame. – Borislav Ivanov Feb 17 '16 at 21:06
  • NB: It seems there's not hotfix for this issue out there yet. I've posted on MS Answers asking if there's anything coming... you can track that thread here: https://answers.microsoft.com/en-us/windows/forum/windows8_1-files/windows-temp-directory-cab-files-causing-disk/0e534920-f138-492c-a33e-674ba2cb0fe5?tm=1521472940404 – JohnLBevan Mar 19 '18 at 15:23
14

The 2GiB Limit Still Haunts Us

I've seen this happen on 64-bit Windows 7 and (as of today) Windows 2008 R2 systems.

Even on 64-bit Windows, the makecab.exe utility breaks on large (2GiB+) files, because the Cabinet file format cannot store files larger than 2GiB..


If any log file in C:\Windows\Logs\CBS grows too big, it breaks the log compression process:

  • The big CBS log file is never compressed
  • Newer CBS log files are never compressed
  • C:\Windows\Temp fills up with corrupt Cabinet files

The corrupt Cabinet files consume about 200MiB+ per day, and cannot be cleared by rebooting.

Unfortunately, you must manually delete the big CBS log file and remove the corrupt cabinet files.


This was an design flaw in Windows 7 that could have been avoided by either:

  • splitting large CBS log files before attempting to compress them, or
  • replacing the Cabinet file format with a more capable format

At any rate, the failure mode of consume all available disk space is a severe oversight.

Hydraxan14
  • 241
  • 2
  • 5
  • 2
    Nice answer. Here is a supporting article ... https://www.computerworld.com/article/3112358/microsoft-windows/windows-7-log-file-compression-bug-can-fill-up-your-hard-drive.html – Nathan Hartley Dec 18 '18 at 21:22
  • Yeah, ever since I first ran into this problem I've wondered why makecab doesn't **check the input size in advace**, and it's just as mysterious why it doesn't **clean up the temp file**... – SamB Jul 14 '19 at 23:34
2

C:\Windows\Temp is a folder commonly used by windows updates, logs or temporary files. During an installation, the application moves the caps files to a temporary folder, In this case C:\Windows\Temp

If you want to free some space, you can delete everything on this folder, My suggestion is delete just the old ones, but keep the most recently files (a month ago).

If you're looking to free some space, you can use TreeSize Free tool or WinDirStat tool. Both are free.

HEMAN85
  • 415
  • 3
  • 9