?
Solved

Exchange 2013 and IIS Logs filling up Hard disk space

Posted on 2016-10-10
6
Medium Priority
?
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 17

Accepted Solution

by:
Ivan earned 1008 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 248 total points
ID: 41836721
0
 
LVL 17

Assisted Solution

by:Gaurav Singh
Gaurav Singh earned 248 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 16

Assisted Solution

by:Todd Nelson
Todd Nelson earned 248 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 248 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In-place Upgrading Dirsync to Azure AD Connect
After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
how to add IIS SMTP to handle application/Scanner relays into office 365.
Suggested Courses

762 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