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

Confluence crashes with OutOfMemory error while previewing multiple attachments with multiple versions via Attachments macro

      Issue Summary

      Confluence crashes with an OutOfMemory error due to Java Heap Space when previewing multiple attachments from the Attachment Macro containing multiple versions. 

      When multiple attachments are viewed from the attachment macro containing multiple versions, the class "org.hibernate.engine.internal.StatefulPersistenceContext" occupies the chunk of heap space due to data contained for each of the attachment versions causing Confluence to crash due to OOM.

      Steps to Reproduce

      While previewing the attachments containing multiple versions from the Attachment macro, there are frequent GC collections due to high heap utilisation leading to OOM error. 

      Attachment content type - application/binary

      Below is the state of the GC collection while previewing the multiple attachments on the Confluence page:

      Heap utilisation by Class 


      When checking the corresponding threads, the object holds information about each of the attachment versions:

      Attached is the complete stack trace for one of the threads.

      Expected Results

      The preview for the latest version of the attachment should be available.

      Actual Results

      Confluence crashing with the OOM Error.

      Workaround Available

      Currently no workaround is available.

            [CONFSERVER-94738] Confluence crashes with OutOfMemory error while previewing multiple attachments with multiple versions via Attachments macro

            Nitin Rastogi added a comment - https://getsupport.atlassian.com/browse/PS-162646

              Unassigned Unassigned
              33df95c63117 Nitin Rastogi
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated: