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

File Conversion Service causes OutOfMemoryError

XMLWordPrintable

      Summary

      The file conversion service in Confluence could cause OutOfMemoryError due to a bug incurring a sustained CPU spike in CONF-38233 which was subsequently fixed in Confluence 5.10.4

      The file conversion service leverages the API provided by Aspose.Pdf for Java. The Aspose library might consume many memory for PDFs having either lots of objects or many contents, especially for large PDF files, say >100Mb. If the memory required is not able to be fulfilled, the OutOfMemory will occur, as a result of that, the system will be very slow to response to user's requests, and the system could be restarted to recover from this situation.

      How to reproduce

      The issue can be reproduced with the following steps,

      1. Startup a Confluence instance with the memory setting: -Xms256m -Xmx1g. 
      2. Create some test pages, then attach some PDF attachments with size more than 100Mb. Note you need to adjust the "Attachment Maximum Size" via the General Configuration.
      3. Click the thumbnails to view the attached PDFs
      4. Continue the #2 and #3 until the OOM comes up

      Workaround

      At this stage, the primary workaround for this issue is to upgrade to Confluence 5.10.4 as the bug causing the CPU to spike and subsequently OOME was fixed as part of -CONF-38233-

      Other, workarounds if you are already running on Confluence 5.10.4 are as the following:

      1. Increase more memory to Confluence instance if possible, as the issue is caused by the short of heap memory
      2. Reduce the memory spike consumed by restricting the maximum size of attachment allowed

              fxu Feng Xu (Inactive)
              fxu Feng Xu (Inactive)
              Votes:
              13 Vote for this issue
              Watchers:
              32 Start watching this issue

                Created:
                Updated:
                Resolved: