Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-73778

PDF conversion process causing OOM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.4.11, 7.12.0
    • None

      Summary

      When attaching PDF files to Confluence Server and converting them to preview, it causes a CPU and memory usage spike on Confluence process which throws an OOM when the maximum memory is reached.

      The PDF attached to this case as an example contains several images of high definition, but the file is only 16MB in size.
      1980.9.24 Spectator - Stern takes over budgeting group.pdf

      The instance can stall and crash given the OOM. The following error appears in atlassian-confluence.log file:

      ERROR [conversion-thread-pdf-thumb-0] [plugins.conversion.impl.TimeoutConversionRunnable] run Cannot convert. Execution error: 
       -- referer: http://rodrigo.com:8411/pages/editpage.action?pageId=65610 | url: /rest/tinymce/1/macro/placeholder | traceId: a124ced5d925262d | userName: admin
      java.lang.OutOfMemoryError: Java heap space
      

      On Confluence datacenter, it uses the external conversion pool to perform this process. The CPU and memory still increase, however, the problem is mitigated by using the external pool, and Confluence continues working as normal.

      There were old bug reports opened with the same behavior before. EG:

      How to replicate

      1) Install Confluence version 7.4.11 server or datacenter. This was tested with 7.12 DC too.
      2) Attach the file from this bug report to a page and save it.
      3) Open the system monitor and start monitoring the Confluence services.
      4) Open the PDF file preview and check the system monitor for the CPU and memory increased usage.

      Mitigation/workaround

      Disable the file conversion service for PDF as stated on this KB article:

      The file can still be uploaded and downloaded from Confluence, but it will not be converted on the pages.

            Unassigned Unassigned
            rgadami Rodrigo Girardi Adami
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: