0
点赞
收藏
分享

微信扫一扫

Reporting Services 占用内存过高问题

忍禁 2023-04-18 阅读 93


收到告警sqlserver服务器内存使用率过高,登录检查发现Reporting Services 占用内存超过13G,检查DB中正在执行的sql并没有发现ReportServer DB相关sql,业务方也说没有查到Reporting Services当前在执行什么。重启Reporting Services服务后故障恢复,查了下网上文章相关问题的分析和调整方法。

 

一、 查询占用内存最高的Reporting Services信息

Select  Top 10 *
From    ReportServer.dbo.ExecutionLog2 el
Outer Apply (
        Select  Sum(
                    Coalesce(c.value('Pagination[1]', 'int'), 0) +
                    Coalesce(c.value('Rendering[1]', 'int'), 0) +
                    Coalesce(c.value('Processing[1]', 'int'), 0)) / 1024.0 As MemoryUsageMB
        From    ReportServer.dbo.ExecutionLog2 el2
        Cross Apply
                el2.AdditionalInfo.nodes('AdditionalInfo/EstimatedMemoryUsageKB') As b(c)
        Where   el.TimeStart Between el2.TimeStart and el2.TimeEnd
        Or      el.TimeEnd Between el2.TimeStart And el2.TimeEnd
        ) a
Order By MemoryUsageMB Desc;

Reporting Services 占用内存过高问题_sql

 

二、 限制Reporting Services最大内存

在RSReportServer.config配置文件在可以限制Reporting Services最大内存,文件位置在

C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer

MSRS13.MSSQLSERVER目录根据实际sqlserver版本而定。

Reporting Services 占用内存过高问题_重启_02

备份然后编辑文件,搜索找到以下部分:MemoryThreshold

添加 <WorkingSetMaximum>1000000</WorkingSetMaximum>(1000000即1G),重启Reporting Services服务

Reporting Services 占用内存过高问题_重启_03

 

参考

https://www.codykonior.com/2015/10/18/a-cool-way-to-check-reporting-services-memory-usage/

https://docs.microsoft.com/zh-cn/sql/reporting-services/report-server/rsreportserver-config-configuration-file?view=sql-server-ver15

https://docs.microsoft.com/zh-cn/sql/reporting-services/report-server/configure-available-memory-for-report-server-applications?view=sql-server-ver15

举报

相关推荐

0 条评论