Out Of Memory in Azure websites

16 posts, 0 answers
  1. p3mek
    p3mek avatar
    18 posts
    Member since:
    Aug 2006

    Posted 19 Nov 2013 Link to this post

    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?
  2. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 20 Nov 2013 Link to this post

    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.

  3. DevCraft banner
  4. p3mek
    p3mek avatar
    18 posts
    Member since:
    Aug 2006

    Posted 20 Nov 2013 Link to this post

    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.
  5. IvanY
    Admin
    IvanY avatar
    417 posts

    Posted 25 Nov 2013 Link to this post

    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.

  6. scubasteveb
    scubasteveb avatar
    6 posts
    Member since:
    Feb 2007

    Posted 24 Feb 2014 in reply to IvanY Link to this post

    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
  7. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 24 Feb 2014 Link to this post

    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.

  8. Dan
    Dan avatar
    8 posts
    Member since:
    Jul 2011

    Posted 07 Jul 2014 Link to this post

    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.

  9. Dan
    Dan avatar
    8 posts
    Member since:
    Jul 2011

    Posted 07 Jul 2014 in reply to Stef Link to this post

    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.

  10. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 08 Jul 2014 Link to this post

    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.

     
  11. Dan
    Dan avatar
    8 posts
    Member since:
    Jul 2011

    Posted 08 Jul 2014 in reply to Stef Link to this post

    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
  12. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 11 Jul 2014 Link to this post

    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.

     
  13. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 31 Jul 2014 Link to this post

    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.

     
  14. Vikrtant
    Vikrtant avatar
    1 posts
    Member since:
    Dec 2014

    Posted 15 Oct 2015 Link to this post

    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 .

  15. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 16 Oct 2015 Link to this post

    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
  16. Amrita
    Amrita avatar
    3 posts
    Member since:
    May 2016

    Posted 22 May Link to this post

    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.

  17. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 25 May Link to this post

    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
Back to Top
DevCraft banner