Exporting to PDF in a multi-process environment

Posted by: marcelsammut on 4 August 2017, 5:46 am EST

    • Post Options:
    • Link

    Posted 4 August 2017, 5:46 am EST

    Greetings,

    I have an application that involves 6 Windows 2k services that run as report servers on a single box.  The reports are built using ActiveReports 2.0 SP4 and the Windows “service” is built using VB6 SP5.  The ActiveReport is contained in a COM DLL (not COM+) which is instantiated (in-process) and executed. On the ReportEnd event, we export the pages collection using the PDFExport component.  The service then releases the ActiveReports COM component.



    These report servers undergo a large volume (~10 reports/min).  After a period of time (~8-9hrs), two of the 6 services become memory hogs, and increase in total memory usage and eventually start using swap space.  During this increase in memory (or memory leak.), the PDF’s start exhibitting graphical anomolies such as logos appearing as black boxes and text missing or garbled, although no errors are thrown.  The GDI count of the services is 0 and doesn’t seem to be affected.



    Eventually the reports start failing due to Out Of Memory from the exporting, and the Window services stop responding.  If the services are restarted, the memory is released and the cycle starts all over again.



    I’m wondering how the export, or even report generation, process is affected with multiple instances of it being executed on a multiple CPU box and why we are seeing a memory leak in the report generation.



    Cheers,

    Marcel Sammut

    msammut@xeye.com



  • Posted 4 August 2017, 5:46 am EST

    What version of ActiveReports are you running? The DD team has worked on memory leak issues and their more recent versions should perform better in that area.



    http://www.datadynamics.com/ShowPost.aspx?PostID=61177&DownloadIssueList=true

    http://www.datadynamics.com/ShowForum.aspx?ForumID=37

  • Posted 14 November 2017, 4:02 am EST

    We are also having the same issue. We have a customer whose website is running in iis. If they click a button on their site, it generates a pdf and displays it in the browser. The PDF’s text is garbled/corrupt. When we remote onto the server, the generated PDF file displays the same corruption. Is there a fix for this?

    Please note that when the PDF’s are generated outside of a web environment, they are exported without any corruption.

    The only fix that seems to work is restarting the AppPool of the site. This fix is only temporary and after a few hours the corruption comes back.

  • Posted 14 November 2017, 10:35 pm EST

    Can you please specify the exact version of ActiveReports you’re using? I would recommend you to call the Dispose method of the SectionDocument or PageDocument class (depending on the type of report you’re using) after exporting to pdf.

  • Posted 15 November 2017, 7:57 am EST

    The library is called “Data Dynamics ActiveReports 2.0”

    I have been trying to conduct tests on our end but loading up memory and then exporting the report but I cannot reproduce this bug on our development machines. We have two customers who are having this issue.

  • Posted 15 November 2017, 7:57 am EST

    The library is called “Data Dynamics ActiveReports 2.0”

    I have been trying to conduct tests on our end but loading up memory and then exporting the report but I cannot reproduce this bug on our development machines. We have two customers who are having this issue.

  • Posted 20 November 2017, 8:19 pm EST

    Hello,

    There could be a memory leakage issue which cause corruption after few hour on restarting the ‘AppPool’. As mentioned earlier, try to call the Dispose method of the object of report and export in your code after exporting.

    Hope it helps.

    Thanks,

    Mohit

  • Posted 21 November 2017, 10:10 am EST

    Alright I’ll look into that to see if that will clear the issue up. I’ll post back when I have determined how to fix this.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels