The .usage logs are never deleted. There should typically be no more than 6 .usage files at any given time, but when you have this problem, you may find hundreds or thousands of usage logs in the logging directory.
You’ll see errors like this in the SharePoint ULS logs when the Usage Import timer job runs:
OWSTIMER.EXE (0x51A0) 0x59E4 SharePoint Foundation Usage Infrastructure a5rv High Failed to delete usage log file‘E:\Logs\ServerName-20130701-2117.usage’ after data import. Exception: System.IO.IOException: The process cannot access the file because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileInfo.MoveTo(String destFileName) at Microsoft.SharePoint.Administration.SPProvisioningAssistant.MoveFileOrDirectory(FileSystemInfo fi, String newPath) at Microsoft.SharePoint.Administration.SPProvisioningAssistant.DeleteFileOrDirectory(FileSystemInfo fi) at Microsoft.SharePoint.Administration.SPUsageLogImporter.ImportUsageLogFiles(List`1 usageLogFileList)
Other symptoms include:
• Missing or incomplete Web Analytics data
• The “Microsoft SharePoint Foundation Usage Data Import” timer job never completes.
• The “Timer Service Recycle” timer job is never able to actually restart the timer service. It tries to pause the Usage Data Import job and cannot, so after ten minutes it skips the recycle.
• Memory bloat (leak) within owstimer.exe. You may see the timer service consume much more memory than normal. Restarting the timer service will bring it back to normal, but it will build up again over time.
• The “Diagnostic Data Provider: Trace Log” timer job intermittently does not import the ULS log data into the Logging database.
This happens when Windows updates KB2775511 or KB2682011 or KB2882822 are applied to the SharePoint servers.
The fix is in the December 2013 Cumulative Update for SharePoint 2010.
If you look at the description for the Foundation package (which is included in the SharePoint server package) here: http://support.microsoft.com/kb/2849981, you will see this description for one of the issues that are fixed:
“After you install hotfix 2775511 or hotfix 2682011 on a SharePoint Server 2010 server, the Usage Provider (.usage) files are not deleted from the file system. Additionally, the .usage files keep growing.”
This is a somewhat generic summarization of the problem that does not include all the known symptoms, but it does fix the issues described in this KB.
Here is the link to the KB and download:
Duncan is a technology professional with over 20 years experience of working in various IT roles. He also has a wide range of other skills in radio, electronics and telecommunications.