Service Fabric (SF) Log files are increasing in size.
Error 1:
Unexpected
behavior SharePoint 2016 server related to trace log on
C:\ProgramData\Microsoft\SF\Log\Traces the amount of log is increasing
continuously without stop.
Or
Issue
with Fabric trace log taking excessive Drive Space. The directory
"C:/ProgramData\Microsoft\SF\Log\Traces" taking up GBs is taking up
GBs worth of data because ETL files are continually generating after hitting
128mb.
Solution
1:
1.
Issue is Service Fabric installation
has been corrupted. Due to this "
C:\Prog,ramData\Microsoft\SF\Log\Traces" log file size is increasing in
Service Fabric fa older.
2.
Need to install service bus in your
environment.
3.
Please click on below link to install
Service Bus.
Uninstall Service Bus and Install it again.
Solution
2:
Microsoft
Azure Service Fabric logs taking fabric trace logs taking excessive Drive
Space- (" C:\ProgramData\Microsoft\SF\Log\Traces") is a known
issue for Azure Service Fabric v5.X. Unfortunately, service Bus 1.1 with TLS
1.2 support v2.0.50926.9 is only compatible to work with Azure Service Fabric
v5.1.163.9590.
Work
around solution:
1.
Provided PowerShell command
-PowerShell command only deletes *.ETL files;
Get-Chillditem-Path
"C:\ProgramData\Microsoft\SF\Log\Traces\*"-Include *.etl -Recurse |
Where-Object {$_.CreationTime -It(Get-Date).AddDays(-14)} | Remove-Item
2.
Referenced below article for Task
Scheduler. How to user Task scheduler To Delete Files Older Than X days
3.
Steps to validate PowerShell command
and Task Scheduler function Properly:
1.
Ran PowerShell command first to
ensure *.ETL files would be listed.
Get-Chillditem-Path
"C:\ProgramData\Microsoft\SF\Log\Traces\*"-Include *.etl
2.
Ran PowerShell command that only ETL
files older than 14days are listed.
Get-Chillditem-Path
"C:\ProgramData\Microsoft\SF\Log\Traces\*"-Include *.etl -Recurse |
Where-Object {$_.CreationTime -It(Get-Date).AddDays(-14)}
3.
Ran PowerShell command delete ETL files
older than 14days are listed.
Get-Chillditem-Path
"C:\ProgramData\Microsoft\SF\Log\Traces\*"-Include *.etl -Recurse |
Where-Object {$_.CreationTime -It(Get-Date).AddDays(-14)} | Remove-Item
4.
Save PowerShell Script --DeleteSFLog.ps1
Create a task Scheduler to delete Files older than 7 days
5.
Open task scheduler/
6.
Click on "Create Basic
Task"
7.
Name the New Task.
8.
Click "Next"
9.
Select a trigger.
10.
Configure selected trigger - Weekly
Sunday
11.
Select "Start a Program"
12.
For a Program/Script field, Click the Browse button and Select PowerShell Script.
13.
Click "Next"
14.
Click "Finish"
15.
Close the task scheduler window.
a.
Validate Task Scheduler ran
successfully and c:\ no longer ha disc space problem
0 Comments