Exchange 2013 Activesync IIS log file size

We are an Microsoft Exchange environment .  We use Active sync to sync our 80 devices (iphones and Samsung galaxies) with exchange, Periodically ( 2 or 3 times a year ) I would delete/cleanup old  c$\inetpub\logs\LogFiles\W3SVC1 and also the W3SVC2 and W3SVC3 folders. They would have a tremendous amount of files and each file could be 30 MB or so.
Now in those folders the files are over 300 MB each and I have to cleanup these folders monthly.
I understand these are log files,  Is my exchange server a problem ? or are some of the smartphones having problems ?
What can I look at to see why these files have now grown 10 times what they were.

Any info is appreciated
EkuskowskiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jackie ManIT ManagerCommented:
Yes, you can delete the log files that are in that directory.  There will be no net effect on your server.

What you can do is reconfigure the logging feature in IIS to rotate the logs out on a regular basis so that you don't wind up with excessively large log files.  You can also reconfig the logging feature to save the log file somewhere else other than the boot partition (c: drive), this helps avoid the situation where the log files clog up the c: drive and causes operational issues with the OS.

If you reconfigure IIS' logging feature you do not need to restart IIS.

Source: https://www.experts-exchange.com/questions/28964138/Can-logs-in-C-inetpub-logs-LogFiles-W3SVC1-be-deleted.html

300mb is not a large log file. Unless you have outstanding tickets from users and you need to do troubleshooting, you can delete the log file.
0
Jeff GloverSr. Systems AdministratorCommented:
We use a script that deletes log files older than 60 days. Its a powershell script and you can run it as a scheduled task every day

$limit = (Get-Date).AddDays(-60)
$path1 = "C:\inetpub\logs\logfiles\w3svc1"
$path2 = "C:\inetpub\logs\logfiles\w3svc2"

# Delete files older than the $limit.
Get-ChildItem -Path $path1 -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force
Get-ChildItem -Path $path2 -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force


To change the amount logs you keep, just change the AddDays part. The script assumes you have a multi-role server. If not, you only use the line you need.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EkuskowskiAuthor Commented:
Thank you for the script,  it will be very helpful, also rotating the logs as Jackie Man noted may be a good idea or even moving to a separate/different location.
I think my underlying question should have been.  " Why are my logs so much larger now, than they were at the beginning of the year ?"
My number of active sync users has not changed
I am wondering if there is something in the log I should look at to find out if I am having some type of problem.
I hope that makes sense.
0
Jeff GloverSr. Systems AdministratorCommented:
If you mean logs getting bigger each day, it can be for many reasons. You could have more people with mobile devices. Also, the logs cover more than just ActiveSync. It also covers OWA and any other web related stuff. They are basically IIS logs.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.