OutOfMemoryException

2 posts, 0 answers
  1. Marius
    Marius avatar
    4 posts
    Member since:
    Aug 2008

    Posted 09 Apr 2010 Link to this post

    We occasionally get the following exception running a report on Telerik Reporting version 2.8.8.273. I know this is an older version. Any confirmation that this is resolved in the latest version or a workaround would be appreciated.

    Exception:

    System.OutOfMemoryException: Exception of type

    'System.OutOfMemoryException' was thrown.

       at Telerik.Reporting.HtmlRendering.Matrix.LoadMatrix()

       at Telerik.Reporting.HtmlRendering.Matrix.Init()

       at Telerik.Reporting.HtmlRendering.Matrix..ctor(ReportItemBase

    reportItem, Boolean renderDockedItems)

       at

    Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

    text context, Int32 itemIndex, DockState dockState)

       at

    Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

    text context, Int32 itemIndex, DockState dockState)

       at

    Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

    text context, Int32 itemIndex, DockState dockState)

       at

    Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

    text context, Int32 itemIndex, DockState dockState)

       at

    Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

    text context, Int32 itemIndex, DockState dockState)

       at Telerik.Reporting.HtmlRendering.Matrix.Render(HtmlRenderingContext

    context)

       at

    Telerik.Reporting.HtmlRendering.ReportSectionBaseRenderer.Render(ReportI

    temBase item, HtmlRenderingContext context)

       at

    Telerik.Reporting.HtmlRendering.HtmlItemRender.Telerik.Reporting.HtmlRen

    dering.IReportItemRender.Render(ReportItemBase item, RenderingContext

    context)

       at

    Telerik.Reporting.HtmlRendering.RenderingContext.Render(ReportItemBase

    item)

       at

    Telerik.Reporting.HtmlRendering.HtmlPage.RenderBodyInternal(HtmlWriter

    bodyWriter)

       at Telerik.Reporting.HtmlRendering.HtmlPage.Render(HtmlTextWriter

    writer, HtmlRenderingContext renderingContext)

       at Telerik.Reporting.HtmlRendering.HtmlReport.Render(HtmlTextWriter

    writer)

       at

    Telerik.Reporting.HtmlRendering.HtmlRenderingExtension.Telerik.Reporting

    .Processing.IRenderingExtension.Render(Report report, Hashtable

    renderingContext, Hashtable deviceInfo, CreateStream

    createStreamCallback, EvaluateHeaderFooterExpressions

    evalHeaderFooterCallback)

       at Telerik.Reporting.Processing.ReportProcessor.Render(String format,

    Report report, Hashtable deviceInfo, CreateStream createStreamCallback,

    String& documentName)

       at Telerik.ReportViewer.WebForms.ServerReport.Render(HttpResponse

    response, String format, Int32 pageIndex, Boolean refresh)

       at

    Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperation(NameV

    alueCollection urlQuery, HttpContext context)

       at

    Telerik.ReportViewer.WebForms.HttpHandler.System.Web.IHttpHandler.Proces

    sRequest(HttpContext context)

       at

    System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpAppli

    cation.IExecutionStep.Execute()

       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,

    Boolean& completedSynchronously)


  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 14 Apr 2010 Link to this post

    Hello Marius,

    First keep in mind that handling large reports usually requires additional resources in terms of powerful CPUs, and enough memory to handle all the operations. As far as the processing time and consumed memory is concerned, the complexity of the report layout, the complexity of the data calculations (aggregates, conditional formatting),  the rendering media, the size of the generated document (in pages), and the capabilities of the underlying machine are crucial. So in this line of thoughts how many rows of data does this report is supposed to show and how many taken up RAM do you see in the task manager before it throws the exception?
    As far as  performance is concerned we recommend to avoid using PageCount because it usually requires an additional pass to count all pages before the actual report rendering (i.e. it renders the report in the memory in order to count all pages). Another option is to reconsider the size of the data you need to display at once. In contrast to Grid controls, where usually a small subset of data records are displayed, the reporting engine usually needs all the data to layout the pages depending on the selected media (output format).
    Please take a look at the following KB article (Performance Considerations) that lists several known culprits and suggestions to avoid them so that you can use our product seamlessly.
    Also upgrading to the latest official release is highly recommended due to the various improvements and new features we have released (see release notes).

    All the best,
    Steve
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top