Solved

Exchange 2013 and IIS Logs filling up Hard disk space

Posted on 2016-10-10
6
163 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 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 16

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
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…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

688 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