HTML Export Fails with JDBCConnectionException on Large Confluence Spaces

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      HTML export operations on large Confluence spaces (e.g., 2k+ pages) fail with JDBC connection errors, as seen in Splunk logs. The error originates from the Velocity template (Page.htmlexport.vm) and is caused by the export process exceeding database connection limits or timing out due to the volume of content being processed.

      Steps to Reproduce

      1. Attempt to export a large Confluence space (thousands of pages) to HTML.
      2. Monitor the export process.

      Expected Results

      HTML export completes successfully, regardless of the number of pages in the space.

      Actual Results

      HTML export fails with a JDBCConnectionException, indicating a database connection issue. The error is thrown from the Velocity template when processing large collections of pages/content.

      The exception below is thrown in the Splunk log:

      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'size' in class org.hibernate.collection.internal.PersistentBag threw exception org.hibernate.exception.JDBCConnectionException: could not prepare statement at com/atlassian/confluence/pages/Page.htmlexport.vm[line 43, col… 

      Workaround

      Currently, there is no known workaround for this behaviour. Recommendations as below:

      • HTML export is not recommended for large spaces due to scalability issues.
      • Use CSV export as a more robust alternative for large data sets.
      • If HTML export is required, split the export into smaller batches (individual spaces or subsets of pages).

      Root Cause:
      The HTML export process is not optimized for very large spaces. Exporting thousands of pages can exceed database connection pool limits or cause timeouts, resulting in JDBCConnectionException errors. This is a known limitation of the legacy HTML export functionality.

            Assignee:
            Unassigned
            Reporter:
            Prasanth K P
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: