Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Report Server expired log file clean up

Dear Team,

 

I've expected an little issue when deleting expired log files especially msmdsrv.log.

Looks like msmdsrv.log is started and created when Report Server Service is started / restarted. During this process log-file is created with new timestamp. Within Report Server cleanup settings is configured that files older than 14 days shall be removed. When cleanup is started within RSHostingService is every minute reported that msmdsrv.log can't be delete because it's in use by ASEngine when it exceeds 14 days of restarting Report Server Service and re-writing / updating logfile.

Therefore all log files are stored by default within "C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles" I'd like to send you my findings, because it's default behaviour and my also affect other customer installations and fill up unnessary their "RSHostingService_XXXX" Log File.

 

If you need additional information don't hesitate to contact me.

 

Many thanks

Daniel

Status: New
Comments
Anonymous
Not applicable

Hello @giwi , Hello @ChrisMuthmann ,

 

I've reopened my Microsoft Ticket again, waiting for Microsoft to response and take another look into issue with current version of Report Server.

 

Update:

I got reply from Microsoft that it's under investigation. It may be fixed with 2022-01 or 2022-05 version.

 

Best regards

Daniel

ChrisMuthmann
Resolver II

Hello @Anonymous ,

thanks a lot for your help!

Kind regards,

Christoph

adimira
Frequent Visitor

 

Aso still seeing this for May 2021 version

2022-08-18 07:45:05.4156|INFO|4|Catalog max connection pool size: 100
2022-08-18 07:45:05.4156|INFO|4|Deleting expired log file: C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log Last written: 7/19/2022 11:26:36 AM
2022-08-18 07:45:05.4156|WARN|4|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the file 'C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.BIServer.HostingEnvironment.Logger.DeleteExpiredFilesInternal(Int32 keepUntilDays, FileInfo[] logFiles)
2022-08-18 07:45:15.4419|INFO|4|Catalog max connection pool size: 100
2022-08-18 07:45:15.4419|INFO|4|Deleting expired log file: C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log Last written: 7/19/2022 11:26:36 AM
2022-08-18 07:45:15.4419|WARN|4|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the file 'C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.BIServer.HostingEnvironment.Logger.DeleteExpiredFilesInternal(Int32 keepUntilDays, FileInfo[] logFiles)
2022-08-18 07:45:25.4717|INFO|4|Catalog max connection pool size: 100
2022-08-18 07:45:25.4717|INFO|4|Deleting expired log file: C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log Last written: 7/19/2022 11:26:36 AM
2022-08-18 07:45:25.4717|WARN|4|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the file 'C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.BIServer.HostingEnvironment.Logger.DeleteExpiredFilesInternal(Int32 keepUntilDays, FileInfo[] logFiles)
2022-08-18 07:45:35.4989|INFO|4|Catalog max connection pool size: 100
2022-08-18 07:45:35.4989|INFO|4|Deleting expired log file: C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log Last written: 7/19/2022 11:26:36 AM
2022-08-18 07:45:35.4989|WARN|4|Exception deleting expired log fileSystem.IO.IOException: The process cannot access the file 'C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.BIServer.HostingEnvironment.Logger.DeleteExpiredFilesInternal(Int32 keepUntilDays, FileInfo[] logFiles)

ChrisMuthmann
Resolver II

After applying at least one of these windows updates (August 2022) the error no longer exists:

- KB5012170

- KB5017095

- KB 5016622

I can not determine which of these updates is responsible for the improvement, but the error is gone away on four servers with these updates.

Kind regards,

Christoph