Forum Discussion
Performance and memory leak issue - PBIRS Jan 2022
- 4 years ago
I wanted to reply to let you know the May release is now live with a fix for the issue reported on this thread.
Hello,
my current workarround is periodically restart RSPowerBI process (not whole PowerBIReportServer service, because it is time consuming and also need reload all models in to memory).
I'm killing RSPowerBI process every hour (with scheduled powershell script Stop-Process -Name RSPowerBI -Force), PowerBI service immediately start new clean process without any outage.
If there is an active Power BI report data refresh process then with killing RSPowerBI.exe this process will also be killed and stucked in SubscriptionHistory table of PBIRS database. To prevent this I've wrapped this command into the script with checking of existence of active PBI data refresh processes:
$dataSource = "YourSqlServerDBEngineInstanceWherePBIRSDatabaseIsLocated";
$database = "master";
$sql = "
SELECT [SH].[SubscriptionHistoryID]
FROM [PBIRS].[dbo].[SubscriptionHistory] [SH] WITH(NOLOCK)
WHERE [SH].[Status] = 1
";
$auth = "Integrated Security=SSPI;"
$connectionString = "Provider=sqloledb; " + "Data Source=$dataSource; " + "Initial Catalog=$database; " + "$auth; ";
$connection = New-Object System.Data.OleDb.OleDbConnection $connectionString;
$command = New-Object System.Data.OleDb.OleDbCommand $sql, $connection;
$connection.Open();
$adapter = New-Object System.Data.OleDb.OleDbDataAdapter $command;
$dataset = New-Object System.Data.DataSet;
[void] $adapter.Fill($dataSet);
$connection.Close();
$rowsCount=($dataset.Tables | Select-Object -Expand Rows).Count;
if ($rowsCount -eq 0) {
Stop-Process -Name RSPowerBI -Force;
};
- josef784 years ago
Memorable Member
Yes, thank you, it is great improvement.
If is Power BI RS deployed on single server (or server is shared for frontend and background task), it need this check.
If is Power BI RS in scale-out deployment, and there are dedicated servers for frontend and dedicated servers for background processes, this issue is related only to frontend PBIRS, where is need to killing RSPowerBI process (in this case is this Subscription check not necessary).