An exception was thrown by a TaskScheduler. Exception of type "System.OutOfMemory" was thrown

1 Answer 245 Views
Report Viewer - ASP.NET
Vincent
Top achievements
Rank 1
Vincent asked on 22 Sep 2023, 09:52 AM

We have a .NET Web Application hosted in Azure. We have recently had reports of issues opening telerik reports with the error: An exception was thrown by a TaskScheduler. Exception of type "System.OutOfMemory" was thrown

 

 

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 26 Sep 2023, 08:17 AM

Hi Vincent,

I noticed that you have asked the same question in a Support ticket. I will summarize my reply from the other thread here so that other users may find it if they hit a similar problem.

Based on the exception message and the screenshot, I assume that you use an HTML5-based Report Viewer to display your reports. It relies on a Reporting REST Service to get the rendered reports, and it looks like the error occurs in the REST Service.

Our code uses internally the TaskScheduler Class when queueing the tasks for rendering reports and for other purposes. Most probably, the "System.OutOfMemory" error is thrown by the GDI+ that we use for measurement and rendering. Unfortunately, the exception message is too general for diagnosis purposes.

I suggest attaching a Trace Listener to the Reporting REST Service. It should log more details on the problem and help us investigate further. If the application is targeting .NET, check the KB Troubleshooting reporting implementation into ASP.NET Core application.

You may also use FiddlerJam to follow the communication between the viewer and the service and check which is the failing request.

Since the application is hosted on Azure, you may also use Azure Logs to obtain additional information on the problem.

Regards,
Todor
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Vincent
Top achievements
Rank 1
commented on 10 Jan 2024, 11:31 AM

Hi,

We will take a look at adding additional logging. We resolved the problem by restarting the Azure Web App.

That was Sept 2023. It has since happened in Dec 2023 and Jan 2024.

So 3 times within 4 months.

Thanks

Vincent

Tags
Report Viewer - ASP.NET
Asked by
Vincent
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or