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

PDF space export never completes for large spaces

XMLWordPrintable

      Problem

      PDF space export hangs at 99% completion for space with thousand of documents (3700 in my test)

      Environment

      Confluence 7.19.12

      Steps to Reproduce

      1. Create a new Confluence space with space key TROL
      2. Run the following loop to create 3700 pages in such space
      for ((i=1;i<3700;i++)) do curl -u admin:password -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"new page'$i'",
      "space":{"key":"TROL"},"body":{"storage":{"value":"<p>This is <br/> a new page number ${i}</p>","representation":
      "storage"}}}' https://confluence.atlassian.test/confluence/rest/api/content/ ; done >/dev/null 2>/dev/null & 
      1. Start a PDF space export through Space Tools->Export->PDF->Normal Export

      Expected Results

      The PDF export completes and a download link is provided.

      Actual Results

      The PDF export hangs forever.

      Confluence application logs has the following error:

      2023-08-29 10:25:28,151 ERROR [Long running task: PDF Space Export] [confluence.util.longrunning.ConfluenceAbstractLongRunningTask] run Long running task "PDF Space Export" failed to run. -- url: /confluence/spaces/flyingpdf/doflyingpdf.action | referer: https://confluence.atlassian.test/confluence/spaces/flyingpdf/flyingpdf.action?key=TROL | traceId: b38cee07ad805b93 | userName: admin | action: doflyingpdfjava.lang.StackOverflowError        at java.base/java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:73)        at jdk.internal.reflect.GeneratedMethodAccessor1481.invoke(Unknown Source)        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.base/java.lang.reflect.Method.invoke(Method.java:566) 

      Workaround

      Add the following Java System properties:

      -Xss8m -Dconversion.sandbox.stack.limit.megabytes=8

      To set the Stack Size for Tomcat running as a Windows service use the Thread Stack Size input field.

      Notes

      Adding only -Xss8m is not sufficient as the export will fails again when attempting to generate the final PDF in the sandbox. For this reason -Dconversion.sandbox.stack.limit.megabytes=8 is required

              Unassigned Unassigned
              6f684947ada5 Marco Salvi (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: