Folder InetPub LogFiles are filling up the c drive of your SBS 2008 or 2011 server

The C drive of your Small Business Server 2008 or 2011 is filling rapidly and when you look with a disk analyzer tool like treesize or windirstat you see that the folder C:\inetpub\logs\LogFiles\W3SVC and a 9 or 10 digit number is several or even dozens of GB. When you open one of the logfiles you see only lines with “POST /ApiRemoting30/WebService.asmx – 8530” in it.

The log file directory belongs to the WSUS Administration IIS website, this is using port 8530. But it is not WSUS that is filling these logfiles rapidly but they are filled if you let the SBS console open. Beside closing the SBS console when not needed, there are 2 option to keep the log files under control.

Option 1:
Open Administrative Tools – Internet Information Services (IIS) Manager, browse through Sites and select the WSUS Administration site and open Logging.

You have 2 options, first you can set the “maximum file size (in bytes):” option under Log file rollover to limit the maximum log file size.
Second option is to completely disable logging, by choosing “Disable” on the Actions menu on the right.

Make sure after you changed anything choose Apply on the upper right and do a iisreset.

Option 2:
The another way for controlling these logfiles is, in SBS 2011 there is by default a scheduled task configured that cleans the logfiles older than 100 days. The same task is added to SBS 2008 by installing Update Rollup 5 (KB2458094) only the default setting with this task is to delete the logfile older than 30 days.

You can change the number of days by opening Administrative Tools, Task Scheduler, go to Microsoft, Windows, Windows Small Business Server 2011 Standard, right click the WSUSLogCleaner task and choose properties. Go to the tab Actions and choose Edit…

The value given by Add arguments (optional) is the value for the number of days the logfiles will be kept. So if your logfile directory is stil really big you can decrease the number of days to something more manageable like 30 days or if this is still to much to something like 14 days.

Conclusion:
The grown of the logfiles is caused by not closing the SBS console. My logfiles have shrunken to 20% of the original size with the console open whole day. There are 2 options to control the growth of these logfiles, IIS to disable logging or maximize the logfile size or the task added in sbs 2008 rollup 5 or sbs 2011 to control the maximum number of days logfiles are kept.

Update:
If you would prevent SBS Console from startup automatically read on here

Posted in Blog, SBS 2008, SBS 2011 by ronnypot at April 15th, 2011.
Tags: , , , ,

15 Responses to “Folder InetPub LogFiles are filling up the c drive of your SBS 2008 or 2011 server”

  1. Susan says:

    SBS 2011 doesn’t suffer from this as there’s a task to clean out the log files.

    • ronnypot says:

      I don’t think this works fine, my test sbs 2011 installation has produced more than 3GB of these logfiles in just a couple of weeks.

    • Ben the IT man says:

      If there is a task that clears out these log files as you say, did you not fancy sharing your information about it? where it is, how to use it????

      • ronnypot says:

        For just deleting log files older than x days, you can use forfiles.exe:

        forfiles.exe /P C:\inetpub\logs\LogFiles\W3SVC1 /S /M *.log /D -14 /C “cmd /c del @file”

  2. dmacleo says:

    my install has this already set to run daily at 2am. seldom see more then 10 entries.

  3. vicky says:

    this article has just saved me massive headaches, thank you!

  4. MrFaize says:

    Another useful tip

  5. VoucherCodes says:

    Really you guys saved my day. Too much concerned when the disk drive grown by 25GB, the disk ran out of space and application stopped working.
    Much appreciated

  6. andy says:

    Thank you for this usefull tip. I used option 2.

  7. Roland says:

    Thanks for the heads up as to why my drive was quickly shrinking, I gained back at least 30GB of my drive by reading this article…

    THANKS!

    Roland

  8. appmin says:

    Thank you so much. This is very good explained. This logging trouble stops working of exchange, in cause of low diskspace.

  9. pradeep says:

    Great knowldge..Wrote about the entire topic. Thanks

  10. ronnypot
    I have to thank you – you just saved a server admin amateur!!!
    Cheers buddy

  11. Nick says:

    Just had the same issue on a new SBS 2011 server installed 1 week before Christmas 2013. It is now the End of January 2014 and the C: partition has filled with 53GB (Yes 53GB) of log files located in the IIS Logfiles folder.

    I have relocated the logs now and dropped the 100 days history to 45 days in the WSUS cleanup schedule. I do have a habit of leaving the SBS Console open.

    The odd thing is we have another customer with exactly the same setup and the log files are a fraction of the size. Their server has been running for over a year and the log file haven’t increased above about 700Mb. Also the files are a lot smaller maybe 3 or 4MB as opposed to 3 or 4GB on the new server.

    • ronnypot says:

      Hi, In most of the case log files are filled more quickly if there is a problem and when a server has more in and outgoing emails is heavilier used, also leaving the SBS console open creates a lot of log files.

Leave a Reply

Current day month ye@r *

Sharing Buttons by Linksku