Failed Request Tracing error LOG FILE MAX SIZE TRUNCATE

Learn how to resolve Failed Request Tracing error LOG_FILE_MAX_SIZE_TRUNCATE
Published on Thursday, 10 November 2011

As you've probably read in my post AppCmd introduction and examples, AppCmd is a very extensive tool to administer Windows Server IIS hosting environments. Therefore, now a bit more about a common error message you might get using Failed Request Tracing (FREB): LOG_FILE_MAX_SIZE_TRUNCATE.

FREB error LOG_FILE_MAX_SIZE_TRUNCATE

If you've set up a Failed Request Tracing - also known as "FREB" - for a website in IIS, and if you've configure FREB with verbose information, a common error message you'll probably get is:

LOG_FILE_MAX_SIZE_TRUNCATE

The maximum size of an FREB log file, in IIS 7+, is 512 KB per default. Once that size is reached, the log file is cut off (truncated) and a message LOG_FILE_MAX_SIZE_TRUNCATE is logged.

Did you know you can easily increase the FREB log file size server wide? The following AppCmd.exe command doubles the size to 1024 KB, or 1 MB:

# increase the maximum size for failed request logs
AppCmd.exe set config /section:sites `
 -siteDefaults.traceFailedRequestsLogging.maxLogFileSizeKB:1024

or 2 MB:

# increase the maximum size for failed request logs
AppCmd.exe set config /section:sites -siteDefaults.traceFailedRequestsLogging.maxLogFileSizeKB:2048

Interesting detail: FREB was first called Failed Request Event Buffering, and this is why the acronym doesn't match its name in Windows Server IIS.

When using PowerShell command prompt you may have to quote the command:

C:\Windows\system32\inetsrv\appcmd.exe set config /section:sites `
  /"siteDefaults.traceFailedRequestsLogging.maxLogFileSizeKB:2048"

Verify the configuration change in the IIS Manager GUI:

IIS Manager Configuration Editor showing traceFailedRequestsLogging maxLogFileSizeKB value as siteDefaults setting.

Install Failed Request Tracing IIS module

Enable IIS Failed Request Tracing.

If you need to install the Failed Request Tracing module in IIS, use Install-WindowsFeature cmdlet and the following command:

Install-WindowsFeature -Name Web-Http-Tracing

Notice the module is called "Web-Http-Tracing". See Install IIS in Windows 11 using PowerShell for additional IIS modules and features.