ES4 Memory Leak?

Avatar

Avatar

michaelt4396151

Avatar

michaelt4396151

michaelt4396151

01-04-2015

We recently upgraded to ES4 in our application where we do Tiff2PDF conversions through the API

The Java heap on the Application Server (WAS) grows over time, where we now proactively recycle.  We did not make any implemenation changes to the API for the ES4 upgade, are there any known changes needed that may be causing this leak?

Below is the API example and a visual of the heap growth.

Mike

adobe.01.jvm.04.01.2015.PNG

//Convert Tiff To Pdf
        try
        {
fileInputStream = new FileInputStream( imageFolderLocation + tiffFileName );
inputDocument = new Document( fileInputStream );
CreatePDFResult result = generatePdfServiceClient.createPDF( inputDocument, tiffFileName, "Standard", "Standard OCR", null, null, null );
resultDocument = new Document( result.getCreatedDocument().getInputStream() );
resultDocument.copyToFile( new File( outputFileName ) );
        }
        finally
        {
              fileInputStream.close();
       }

//merge converted pdfs into single document
mergeDdx =
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="MergedPDFResult">
<PDFGroup>
<NoForms/>
<PDF source="DocList"/>
</PDFGroup>
</PDF>
</DDX>

        List<Document> pdfInputs = new ArrayList<Document>();
        for( String pdfInputFileName : pdfInputFileNames )
        {
            Document document = new Document( new File( pdfInputFileName ), true );
            pdfInputs.add( document );
        }

        Map<String, Object> assemblerInputs = new HashMap<String, Object>();
        assemblerInputs.put( "DocList", pdfInputs );

        AssemblerOptionSpec assemblerSpec = new AssemblerOptionSpec();
        assemblerSpec.setFailOnError( true );

        try
        {
            AssemblerResult jobResult = assemblerServiceClient.invokeDDX(mergeDdx, assemblerInputs, assemblerSpec );
            mergedDocument = this.extractDocumentFromResult( jobResult );

            mergedDocument.copyToFile( new File( mergedDocumentFileName ) );
            mergedDocument.dispose();

            for( Document document : pdfInputs )
            {
                document.dispose();
            }
        }
        catch( OperationException oe )
        {
            PdfConversionServiceImpl.LOGGER
                    .error( "Could not assemble PDF document." );
            String message = this.getExceptionContents( oe );
            FormsException fe = new FormsException( message );
            throw new FormsException( "Could not assemble PDF document.", fe );
        }

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

WASIL

Employee

Avatar

WASIL

Employee

WASIL
Employee

14-04-2015

Please go through the performance tuning guide, that should help : http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/livecycle/pdfs/lces2-performance-tuning-guide...

-Wasil