Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

ES4 Memory Leak?

Avatar

Avatar
Level 1
michaelt4396151
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
michaelt4396151
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
michaelt4396151
Level 1

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
Boost 50
Employee
WASIL
Employee

Likes

50 likes

Total Posts

386 posts

Correct Reply

51 solutions
Top badges earned
Boost 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Boost 50
Employee
WASIL
Employee

Likes

50 likes

Total Posts

386 posts

Correct Reply

51 solutions
Top badges earned
Boost 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
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