Jump to content
  • RunReportServiceImpl and jvm crash due to heap retention of past report executions


    maynalem
    CategoryBug report
    Component: 6837
    PriorityNormal
    ReproducibilityAlways
    ResolutionOpen
    SeverityMajor
    StatusNew
    Versionv5.6.0

    jasperreports server v 5.6.0

    Installed via the install script using the packaged tomcat, java, sql database.

    jvm opts: -Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Djava.awt.headless=true

     

    I'm trying to request the same report 5-10 thousand times passing in different report parameters on each iteration. A request for the next report is only made after the current report has finished. Typically the report will be 1-2 pages.

     

    i.e http://localhost:8080/jasperserver/rest_v2/reports/reports/myreport.jrprint?param1=[a value]

     

    initial the reports are returned successfully, then more slowly, until the jvm crashed.

     

    A heap dump reveals that com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl is consuming the majority of the heap.

    It appears that the executions attribute of RunReportServiceImpl is retaining past com.jaspersoft.jasperserver.remote.services.ReportExecution objects.

     

    The ExecutionStatus of past ReportExecution objects is "ready".

     

    Any feedback would be appreciated, maybe there is something I'm missing that will allow these old ReportExecutions to be released and I have overlooked.

     

    Thank you.

     


    Attachments:

    User Feedback

    Recommended Comments

    Changed Assigned User from @User_306070 to -


    RunReportServiceImpl is a Session scoped bean which retains all history of report executions. We are using /rest_v2/reports to execute reports and each request is authenticated individually. This causes to create one session for each request that stay active in memory until it times out (default to 20 minutes). Under load, a large number of REST request easily fill up all the memory with info that is no longer needed.This issue has to be addressed sooner than later.
    Link to comment
    Share on other sites

    The JasperReports Server Web Services Guide includes a section named "Logout" that contains details about how to close sessions. Doing that would release the memory used by a report as soon as the report/session is no longer needed.

     

    Regards,

    Lucian

    Link to comment
    Share on other sites


×
×
  • Create New...