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

Long running PDF exports are not downloadable

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Summary

      All HTTP requests in Cloud have a 60 second timeout. When a PDF export runs longer than that, the task keeps running on the background but the .pdf generated is not returned to the customer. If another PDF export is triggered, Confluence tries to generate a new PDF, even though it already has one from the last export and again, it wont be downloadable.

      There is also a 30 second retry done automatically by the smart-status timeout page from the client browser that will trigger new PDF exports. Confluence will deny a new PDF export to run with the message:

      java.lang.IllegalStateException: Too many concurrent exports. 1 is max allowed.
      

      but as soon as the export finishes it will start a new PDF export.

      PDF exports that take longer than 1 minute are high CPU tasks. This loop of generating new pdf files can render Cloud sites unusable on certain situations.

      Environment

      • Confluence

      Steps to Reproduce

      1. Create a Confluence Cloud page with 100 external images from another Cloud site (this will fail to retrieve images for the pdf at the rate of 1 image each second.
      2. Export page to PDF

      Expected Results

      pdf file is downloadable at the end of the process. If it is not, then a new PDF export downloads the previous generated file if the page wasn't modified.

      Actual Results

      Confluence generates a pdf indefinitely until the browser is stopped.
      New PDF exports are rejected but as soon as it completes, it starts a new one when it is automatically requested by the smart-status 30 second refresh.

      confluence/home/temp directory contains multiple .pdf files of the same page

      Suggestion

      Confluence could detect that there is a pdf export already in the temp directory for the same unmodified page and transfer that to the browser or provide the option for the customer to decide; in case there is dynamic content on the page and a new pdf export is explicitly requested.

      Workaround

      • Use the Space Tools PDF Export Option: as a Space Admin, Space Tools > Content Tools > Export

      Attachments

        Issue Links

          Activity

            People

              onevalainen Olli Nevalainen
              mfernandezbadii Mauro Badii
              Votes:
              7 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: