Solved

Exchange 2013 and IIS Logs filling up Hard disk space

Posted on 2016-10-10
6
74 Views
Last Modified: 2016-10-11
So recently we ran into a problem on our exchange environment. The "logging" folder in the exchange server is filling up about 30GB of space, and the same goes for the IIS logs folder also about 30GB and this caused our exchange server to stop receiving mail. This appears to have started since the latest Exchange 2013 CU that we applied.

Is there anyway to cut down or have it clear out logs after they are X days old with out messing up exchange?
0
Comment
Question by:Crossroads305
6 Comments
 
LVL 16

Accepted Solution

by:
Ivan earned 252 total points
ID: 41836718
Hi,

you can configure task, to delete logs older then XX days. I am using this method.
Save as VBScript, and run as task.

Change log folder path (if you are not using default), and change iMaxAge (to delete log older then 30 days, in this case).

sLogFolder = "c:\inetpub\logs\LogFiles"
iMaxAge = 30   'in days
Set objFSO = CreateObject("Scripting.FileSystemObject")
set colFolder = objFSO.GetFolder(sLogFolder)
For Each colSubfolder in colFolder.SubFolders
        Set objFolder = objFSO.GetFolder(colSubfolder.Path)
        Set colFiles = objFolder.Files
        For Each objFile in colFiles
                iFileAge = now-objFile.DateCreated
                if iFileAge > (iMaxAge+1)  then
                        objFSO.deletefile objFile, True
                end if
        Next
Next

Helpful link: http://www.iis.net/learn/manage/provisioning-and-managing-iis/managing-iis-log-file-storage

Regards,
Ivan.
0
 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 62 total points
ID: 41836721
0
 
LVL 17

Assisted Solution

by:Gaurav Singh
Gaurav Singh earned 62 total points
ID: 41836722
you can schedule  the script to clear the logs . For IIS Refer

https://www.iis.net/learn/manage/provisioning-and-managing-iis/managing-iis-log-file-storage

About exchange can you please let us know what folder it is?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 14

Assisted Solution

by:Todd Nelson
Todd Nelson earned 62 total points
ID: 41836801
Most logs in Exchange have a lifetime between 7 to 30 days.  This is common beginning with Exchange 2013, not with a specific CU.  Is it possible that coincidentally you had an increase in traffic or something else is or has recently occurred to that server>

If you have available space on another disk, you can move the logs from the default of C (if that's where they reside currently) ... http://social.technet.microsoft.com/wiki/contents/articles/22479.move-logging-in-exchange-2013-via-powershell.aspx

If you are just looking to remove log files, refer to this reference article ... https://oddytee.wordpress.com/2014/09/11/references-remove-exchange-2013-diagnostic-log-files/
0
 
LVL 63

Assisted Solution

by:Simon Butler (Sembee)
Simon Butler (Sembee) earned 62 total points
ID: 41837058
IIS logs just build and logging is enabled by default.
I recently cleared over 300gb of logs from a server - they hadn't been deleted since 2011.

If you don't want logging on IIS, then disable it within IIS manager.

The installation of the cumulative update would have nothing to do with the increase in logs.
0
 
LVL 1

Author Comment

by:Crossroads305
ID: 41838782
Thanks for all the help, Maybe it's just a coincident. a bunch of people got iPhones as of late here as well and I saw some articles talking about them causing excessive logging problems. I'll put some of these solutions in place and see if it helps.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now