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

High CPU usage and preview keeps loading for PDF macro or Powerpoint macro

    XMLWordPrintable

Details

    Description

      Summary

      When we use the PDF macro or Powerpoint macro to display files the preview keeps loading.
      We also observe high CPU usage on Confluence server

      Environment

      Windows , this could not be replicated on linux
      Confluence 5.10.x

      Steps to Reproduce

      1. Create a page
      2. Attach a PDF file
      3. Add the pdf macro , you can use { then type pdf
      4. Try to save the macro after selecting the file and save the page

      Expected Results

      The macro should load in time and no impact on CPU .

      Actual Results

      1. The below exception is thrown in the atlassian-confluence.log file:
        (This will appear only if the macro does not load at all)
        2016-09-12 13:47:10,243 WARN [DefaultSlideCacheManager:thread-1] [persistence.dao.filesystem.TrackingAttachmentDataFileSystem] getAttachmentData Unexpected exception getting fileStoreId - cannot log metrics of operation
         -- referer: http://xxx/display/xx/xxx+xxx | url: /plugins/servlet/pptslide | traceId: 37a8bcd860ea045c | userName: admin
        net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection - no session or session was closed
        	at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:209)
        	at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:71)
        	at net.sf.hibernate.collection.Bag.iterator(Bag.java:256)
        	at com.atlassian.confluence.content.ContentProperties.find(ContentProperties.java:112)
        	at com.atlassian.confluence.content.ContentProperties.getStringProperty(ContentProperties.java:73)
        	at com.atlassian.confluence.pages.Attachment.getFileStoreId(Attachment.java:208)
        	at com.atlassian.confluence.pages.persistence.dao.filesystem.TrackingAttachmentDataFileSystem.getAttachmentData(TrackingAttachmentDataFileSystem.java:80)
        	at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.getDataForAttachment(FileSystemAttachmentDataDao.java:63)
        	at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.getAttachmentData(AbstractHibernateAttachmentDao.java:237)
        	at com.atlassian.confluence.pages.attachments.CachingAttachmentDao.getAttachmentData(CachingAttachmentDao.java:174)
        	at com.atlassian.confluence.pages.DefaultAttachmentManager.getAttachmentData(DefaultAttachmentManager.java:231)
        	at com.atlassian.confluence.pages.DefaultAttachmentManager.getAttachmentData(DefaultAttachmentManager.java:225)
        	at com.atlassian.confluence.pages.DelegatorAttachmentManager.getAttachmentData(DelegatorAttachmentManager.java:114)
        	at com.atlassian.confluence.pages.CachingAttachmentManager.getAttachmentData(CachingAttachmentManager.java:87)
        
      2. CPU is high for most of the time . You can see the high CPU when the macro keeps loading
      3. In browser consolve we see a 404 status for this request : http://10.60.3.192:8510/plugins/servlet/pptslide?attachment=xyz.pdf&attachmentId=950274&attachmentVer=1&pageId=950275&slide=1 and the response is * {"error": "converting"}

        *

      Notes

      We also observe the same when viewing powerpoint macro

      We can disable the Office connector macro system add-on from General Configuration >> Manage add-ons >> Sytem Add-ons which has these macros. This way we can avoid the High CPU.

      Attachments

        1. test.pdf
          685 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              msayed Mizan Ali Sayed (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: