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

PPTX File conversion causes OOM

XMLWordPrintable

      Issue Summary

      Uploading PPTX files comprising of gif files to Confluence can cause a high CPU/Memory usage which causes the instance to crash with OOM or become unavailable, the Aspose Library for Powerpoint Slides being used doesn't implement an InterruptMonitor to stop that thread from leaking memory or CPU resources.

      Steps to Reproduce

      1. Upload a large Powerpoint file with gif's or high resolution images on them (single file or multiple files that accounts to >= 60 MB)
      2. Wait for the preview to generate

      Expected Results

      Confluence should be able to handle the conversion of a PPTX file and if it reaches a certain threshold it should kills/quit the conversion.

      Actual Results

      Confluence becomes unresponsive and eventually crashes with OOM. Below are the entries we see in the application logs:

      The below exception is thrown in the atlassian-confluence.log file:

      2020-12-08 08:22:22,292 WARN [conversion-thread-0] [plugins.conversion.impl.FileSystemConversionState] markAsError Creating error file: E:\Atlassian\Application Data\Confluence\shared-home\dcl-document\243\88\132588743\150120046_1.err
       -- referer: <conf-base-url>/pages/resumedraft.action?draftId=144086730&draftShareId=7a55e4b3-8a6b-4c59-b5cd-fe48823846b3& | url: /rest/tinymce/1/macro/placeholder | traceId: c111c0b112fa6251 | userName: x
      
      2020-12-08 08:37:53,973 WARN [https-jsse-nio-443-exec-39] [confluence.util.profiling.DefaultActivityMonitor] close Exceeded the threshold of 60000 ms: ActivitySnapshot{startTime=1607433872023, threadId=90214, threadName='https-jsse-nio-443-exec-39', userId='<unknown>', type='web-request', summary='/rest/quickreload/latest/132588743?since=1607433780031&_=1607433188330'}
       -- referer: <conf-base-url>/display/XYZ/ABC?preview=%2F132588743%2F150120046%2FOverview.pptx | url: /rest/quickreload/latest/132588743 | traceId: 4c6adaa4663cbe88 | userName: x
      
      2020-12-08 08:44:05,422 WARN [https-jsse-nio-443-exec-47] [confluence.util.profiling.DefaultActivityMonitor] close Exceeded the threshold of 60000 ms: ActivitySnapshot{startTime=1607433872017, threadId=90230, threadName='https-jsse-nio-443-exec-47', userId='<unknown>', type='web-request', summary='/download/attachments/132588743/Overview.pptx?version=1&modificationDate=1600948608563&api=v2&download=true'}
       -- referer: <conf-base-url>/display/XYZ/ABC?preview=%2F132588743%2F150120046%2FOverview.pptx | url: /download/attachments/132588743/Overview.pptx | traceId: c60ecfb0a405e8a1 | userName: x
      

      Heap Dump Analysis

      Heap indicates the file conversion has consumed 10 GB of heap.

      Workaround

      • Increase the heap memory to a value where we no longer see the issue. We don't advise that as this might impact overall performance unless small increments would help.
      • Avoid adding gif's and substitute that with multiple screenshots etc

              Unassigned Unassigned
              cathikary Chandu
              Votes:
              19 Vote for this issue
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: