C: Drive being filled up with log files in the C:\Windows\System32\Logs\W3SVC1 folder

book

Article ID: 180490

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

Problem
The C Drive is being filled up, and causing problems due to the lack of disk space.

Environment
Notification Server 6.0 SP3
Any size C drive (the drive being filled will usually be the same drive the OS is installed on).

Cause
There may be many causes for your C drive to fill up, but in this case the administrator had only installed the operating system and very few applications.

Upon further inspection, I discovered that the folder taking up the most space was the C:\Windows\System32\Logs\W3SVC1 folder (the number at the end may differ, W3SVC followed by the number of the Web site it's designated for. In this example it was the default Web site). The log files were getting as large as 600MB any given day. The log files had not been purged/cleared out in years.

Resolution
It's good practice to periodically go through your log files that are not automatically purged and remove (or move) old ones that you will no longer need.  You might also want to consider making some adjustments to your logging settings to take less information, but this will depend on your company's needs.

The most common options are:

  1. Periodically purge the log files.
    1. Just go into the folder and delete ones you don't think you'll need anymore.
  2. Move the log file location to a larger hard drive.
    1. Open your IIS Manager by going to your Control Panel > Administrative Tools > Internet Information Services (IIS) Manager.
    2. Expand your server, then Web Sites, and right-click your default website (or Altiris website if you have it set up to something other than the default) and click Properties.
    3. At the bottom of the Web Site tab you will have Enabled Logging checked.
    4. Click the Properties button.
    5. At the bottom of the General tab, there is the Log file directory. Change it to your desired location.
  3. A combination of options 1 and 2.

If you decide to not log anything (not recommended), you can follow steps 2a through 2c, and then uncheck the Enable logging check box.