Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2200

Memory leak with org.apache.pdfbox.pdmodel.font.PDFont#cmapObjects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.6, 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: PDModel
    • Labels:
      None

      Description

      We use Tika to extract text from a large number (10,000+) of PDFs in a long running JVM, after doing this for a while we started running short of heap space. A heap dump shows that about 717MB of heap is retained through org.apache.pdfbox.pdmodel.font.PDFont#cmapObjects and the hashmap has 18001 entries.

      PDFBOX-1009 looked to partially address this but it appears the symptons are still present. As a workaround I'm going to manually call PDFont.clearResources() after indexing each document to prevent this happening, but it would be better if I didn't have to.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                buckett Matthew Buckett
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: