Recently ran into an issue with a fresh out of the box MOSS2007 installation where we were getting uncontrolled log growth in the SharePoint logs in C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions12LOGS.  Throttling the logs to keep less and rollover to new files more frequently in Central Administration did not solve the issue (or at least mask it) because the logs would fill up with 40+ GB of data in the matter of a few minutes.  As you can tell from the log location above, this would fill the primary disk up and only leave the logging mercy rule of 200MB remaining on the disk.<!--more-->

There are a few ways in which we can resolve this issue and even a few common causes of it.  The most common which was the case in this instance was the logs were getting filled with the error message "Preserving template record with size…" which would lead you down the path of questioning whether your system had enough resources.  Which could very well be the case since this message is commonly thrown when not enough memory is available and the system is stressed.  The real reason for this error in this instance is a mistake in the way the this message is logged.  By default, SharePoint logs ERRORS of MEDIUM severity or higher for the DEFAULT log category.  This message (not error) is mistakenly logged as a MEDIUM severity when in reality it is only supposed to appear when VERBOSE logging is enabled.  There is a hotfix out for WSS3.0 that can be found at <a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=968850&amp;kbln=en-us">http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=968850&amp;kbln=en-us</a>.  This hotfix requires WSS3.0 SP2 to be installed prior. 

Also, as a workaround and a typical best practice that should be observed anyways.  I recommend the following steps when configuring your SharePoint setup.
<ol>
	<li>Redirect the trace logs to a secondary disk.  The trace service will stop automatically in later versions with 200MB of disk still available.  This will allow your services to continue operations.  You can monitor the trace service to alert you when it has stopped.</li>
	<li>Change your GENERAL logging settings in Central Admin -&gt; Operations to only log GENERAL, ERRORS of HIGH severity. </li>
	<li>Apply the patch listed above to correct the logging on a WSS setup.  Use the steps 1 and 2 as a workaround for a MOSS installation.</li>
</ol>
Have any questions or additional workaround ideas?  Post them below.