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

            [CONFSERVER-43363] File Conversion Service causes OutOfMemoryError

            A fix for this issue is now available for Confluence Server customers.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Jade Giacoppo (Inactive) added a comment - A fix for this issue is now available for Confluence Server customers. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Minh Tran added a comment -

            Thanks for letting us know albourne.software. I assume that version is 5.10.7

            Minh Tran added a comment - Thanks for letting us know albourne.software . I assume that version is 5.10.7

            we upgraded confluence to latest versiona nd our issue was resolved

            but we had to reupload all pdfs with missing thumbs

            Albourne Software added a comment - we upgraded confluence to latest versiona nd our issue was resolved but we had to reupload all pdfs with missing thumbs

            Minh Tran added a comment -

            albourne.software Is there any chance that we could have that pdf for testing?

            Minh Tran added a comment - albourne.software Is there any chance that we could have that pdf for testing?

            when do you plan to fix this issue?
            we have pdfs but they are 2-3mb, no thumbnail gets generated confluence version 5.10.7

            Albourne Software added a comment - when do you plan to fix this issue? we have pdfs but they are 2-3mb, no thumbnail gets generated confluence version 5.10.7

              fxu Feng Xu (Inactive)
              fxu Feng Xu (Inactive)
              Affected customers:
              13 This affects my team
              Watchers:
              32 Start watching this issue

                Created:
                Updated:
                Resolved: