This is a migrated thread and some comments may be shown as answers.

Out Of Memory in Azure websites

15 Answers 884 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
p3mek
Top achievements
Rank 1
p3mek asked on 19 Nov 2013, 03:01 PM
Hi Guys
There are many threads on here about the reporting + azure = outofmemory issues but none seem to have a solution.

Our situation, we have been using our site for a few years now and it's worked fine until we deployed it to Windows Azure Websites.
Each time we generate a pdf report (approx 30-40kb) we get the following exception.

Out of memory. STACK TRACE: at System.Drawing.Font.ToLogFont(Object logFont) at System.Drawing.Font.ToHfont() at Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC) at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont) at Telerik.Reporting.Pdf.PdfFontDictionary..ctor(PdfDocument document, PdfFont drawingFont) at Telerik.Reporting.Pdf.PdfFontType0Dictionary..ctor(PdfDocument document, PdfFont font) at Telerik.Reporting.Pdf.PdfPageDictionary.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary) at Telerik.Reporting.Pdf.Rendering.PdfRendererGraphicsState.Update(PdfFont font, Brush brush, Int32 renderMode) at Telerik.Reporting.Pdf.Rendering.PdfRenderer.Update(PdfFont pdfFont, Brush brush, Int32 renderMode) at Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont font, Brush brush, RectangleF rect, Boolean rightToLeft) at Telerik.Reporting.Pdf.Drawing.PdfGraphics.DrawString(String s, Font font, Brush brush, RectangleF rect, StringFormat format) at Telerik.Reporting.ImageRendering.CanvasPdf.DrawStringMultiline(String s, Font font, Brush brush, RectangleF rect, Single lineHeight, StringFormat format) at Telerik.Reporting.ImageRendering.DocumentBase.WriteText(String text, RectangleF bounds, Single lineHeight, IStyle style, StringFormat format) at Telerik.Reporting.Writing.TextBoxWriter.Write(DocumentWriter writer, ProcessingElement element, ElementPageInfo pageInfo, IPageClip pageClip) at Telerik.Reporting.Writing.ProcessingElementWriter.StartWrite(ProcessingElement element, ElementPageInfo pageInfo, DocumentWriter writer) at Telerik.Reporting.Processing.ProcessingElementVisitor.Visit(ProcessingElement element) at Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler) at Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler) at Telerik.Reporting.Paging.PageComposition.SendPhysicalPages(Boolean lastPage) at Telerik.Reporting.Paging.PageComposition.PageOverride() at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo)

We have purchased priority support with Azure to help us with this issue, noting that it hasn't been happening on our previous host.
They concluded that this was a telerik issue, since the azure sites run in Full Trust by default.
We are using .NET4.5 framework with Telerik Reporting Q3 2011 SP1 (5.3.12.119)

Has this issue been identified and is there now a solution?

15 Answers, 1 is accepted

Sort by
0
p3mek
Top achievements
Rank 1
answered on 20 Nov 2013, 01:20 PM
Hi,

This is a known issue with Windows Azure Shared Websites related to their GDI+ support, required for any reporting solution. Our demo at http://telerikreporting.cloudapp.net/ runs as expected, so our suggestions is to use Azure Cloud Service instead of Web Sites.

You may find useful the Running Telerik Reports in the cloud with Windows Azure Part 2 help article.

Let us know if you have any further questions.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
p3mek
Top achievements
Rank 1
answered on 20 Nov 2013, 03:43 PM
Thanks for your reply Stef.

However, moving to a service is not an option for us at this point..
Are there any work around or bandaids to cure this for now on the azure websites certain fonts?, removing images?
The report is a single page report (invoice) and we don't use a viewer, just render directly to pdf and save to a file.
The size of the report is small and we don't generate many of them.
We've tried changing the fonts to Arial but that doesn't fix it.
Could it be that the Telerik reporting control could have a memory leak and it's not destroying all handles?

Can you provide some other alternatives to working around this other than running it as a service please.
0
p3mek
Top achievements
Rank 1
answered on 25 Nov 2013, 12:57 PM
Hi Michael,

The issue with Windows Azure Shared Websites is that they do not support GDI+. Telerik Reporting internally works with GDI+ to perform all the rendering for some formats and part of the rendering for other formats. There is no way to for Telerik Reporting to stop working with GDI+. So the only solution in your case is the proposed in the previous post.

Regards,
IvanY
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
p3mek
Top achievements
Rank 1
answered on 24 Feb 2014, 06:36 PM
We are running into a similar situation with the latest version of Telerik reporting in an Azure Website using the HTML5 report viewer.  Is there any update on a fix or workaround for this besides having to use a cloud service?

Thanks
Steve
0
p3mek
Top achievements
Rank 1
answered on 24 Feb 2014, 06:54 PM
Hello Steve,

This is a limitation of Azure Web Sites, which is commonly discussed in forums  as this.
Currently the solution is to render reports out of Azure Web Sites.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
p3mek
Top achievements
Rank 1
answered on 07 Jul 2014, 09:10 PM
There has been a fixed deployed by Microsoft for this issue.  I've tested it with the Telerik RadGrid export using Excel BIFF.  The latest from Microsoft is in this thread: http://social.msdn.microsoft.com/Forums/windowsazure/en-US/d14bc4fa-256e-4f8f-9682-432ab556f74d/report-viewer-control-fix-for-export-to-pdf-available?forum=windowsazurewebsitespreview.

0
p3mek
Top achievements
Rank 1
answered on 07 Jul 2014, 09:10 PM
There has been a fixed deployed by Microsoft for this issue.  I've tested it with the Telerik RadGrid export using Excel BIFF.  The latest from Microsoft is in this thread.

0
p3mek
Top achievements
Rank 1
answered on 08 Jul 2014, 12:32 PM
Hello Dan,

Thank you for your update.

We are going to test if the fix allows the generation of PDF/Excel documents by applications hosted in Azure Web Sites. Any details where (region) and how (plan in Azure) you deploy and if you tested any reporting solutions will be appreciated.

Keep in mind the fix from Microsoft may not be applied yet to all third-party providers.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
p3mek
Top achievements
Rank 1
answered on 08 Jul 2014, 01:04 PM
I believe it was originally just in the South Central U.S., but I think it has been pushed out to all now.  I have tested it in the North and South Central U.S. Regions.  It only will work in Basic or Standard mode (not Free or Shared),

Dan
0
p3mek
Top achievements
Rank 1
answered on 11 Jul 2014, 12:57 PM
Hi Dan,

Thank you for the provided information.

We will perform several tests in Azure WebSites and will update this forum thread with our findings.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
p3mek
Top achievements
Rank 1
answered on 31 Jul 2014, 03:58 PM
Hello,

We can confirm the export into PDF and Excel, and the print operation respectively, via Telerik Reporting libraries are available in Azure WebSites Basic and Standard modes.

Using Azure WebSites in Free and Shared mode still results in an error on exporting into PDF and on printing.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
p3mek
Top achievements
Rank 1
answered on 15 Oct 2015, 01:44 PM

Hi , I am using telerik html5 report viewer . My application running fine at local server and also at smarter asp. But when I deploy my application at Azure as a cloud service I am facing an error..

 

{"message":"","exceptionMessage":"Report instance with ID '062519-c7a8' not found.","exceptionType":"Telerik.Reporting.Services.Engine.InvalidInstanceException","stackTrace":"   at Telerik.Reporting.Services.Engine.ReportEngine.GetDocument(String clientID, String instanceID, String documentID)\r\n   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetDocument(String clientID, String instanceID, String documentID)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}

 

Is someone has any idea about the issue. Please provide some work around to get out of it if possible.

 

Thank You .

​

0
p3mek
Top achievements
Rank 1
answered on 16 Oct 2015, 04:35 PM
Hi Vikrtant,

To deploy the Reporting REST service in Azure, you will have to use an IStorage implementation suitable for web farms.


Reports can be also directly rendered in a selected format through a ReportProcessor instance - Exporting Report Programmatically.

The known issues and scenarios with Azure are listed in the following articles:



Let us know if you have any further questions.


Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
p3mek
Top achievements
Rank 1
answered on 23 May 2016, 02:49 AM

Hi,

I have my web application deployed to windows azure website which is under standard pricing tier. Trying to load a report with lot of images. it ran into error saying request timed out. Then after increasing http runtime to 6 mins , report viewer is neither showing report contents nor showing any errors. It just shows "0 pages loaded so far" and does nothing. I waited for around 15 mins but report was not loaded.

0
p3mek
Top achievements
Rank 1
answered on 25 May 2016, 01:26 PM
Hi Amrita,

About the issue on displaying the report, please test if it is reproducible only in IE browser. If yes, most probably the report is designed to use a Table item, which is rendered on a single continuous page in Interactive Preview. Setting the viewer to display reports in Print preview should resolve the issue.

For more details, please check Browsers and Limitations (HTML Rendering).


In case the issue is not related, please get the exception stack trace and test to reproduce the problem locally. We can also perform tests if the issue is reproducible locally by sending us the demo project.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
p3mek
Top achievements
Rank 1
Answers by
p3mek
Top achievements
Rank 1
Share this question
or