Very large log files in IIS 7.x

iis-7iis-7.5log-fileswindows-server-2008windows-server-2008-r2

I had a site stop working today and when I RDP'd into the server I saw a warning about low disk space. The first thing I checked was the inetpub folder where the log files are stored and sure enough it was huge, 40 GB huge. I do clean the files monthly but what is causing a day's worth of logging on a medium activity site (www.vbdotnetforums.com) to create 300-500 MB log files? I do have everything being logged so my SmarterStats software gives me the most info, but are there specific things I should/can turn off that is causing the most growth in these log files?

Also, sure would be nice if Microsoft someday had some sort of log file management such as deleting log files after they exceed a certain size (total), X days, etc. We all have to come up with some solution to delete the old ones manually.

Thanks

Neal

Best Answer

Couple things to consider: first, make sure you don't have your logs on your system partition if you have control over the server at all. Ideally, have separate partitions (ideally drives, but at least partitions) for holding the C: drive (system files and page file), and your IIS content and logfiles. In terms of rotation, there are a bunch of people out there who have written scripts that can help with this, though I agree with the answer above: if this is not normal behavior, someone is trying to "tumble" your site in some manner. Script I use: www.scriptinganswers.com/vault/Files%20and%20Folders/ -> DelFileByExtAndAge.vbs

Related Topic