How to enable debug logging to investigate document conversion problems in Confluence's External Process Pool (sandbox)

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

In Confluence Data Center, resilience against the impact of memory or CPU intensive document conversion actions (such as previewing Microsoft Office files or exporting pages as PDF) is achieved by delegating these tasks to an external process pool. This is a separate pool of java processes, managed by Confluence. These java processes (also known as sandboxes) can crash or be terminated and will be restarted automatically, without affecting the main Confluence java process. However, there are situations where finding the cause of a sandbox process's crash or forceful-termination becomes necessary (such as investigating why a specific document conversion or preview generation attempt fails). 

Solution

  1. Navigate to Confluence on a tab in the browser, note the Confluence node ID of the active session (scroll to the bottom of the Confluence web interface, the Confluence node ID is visible in the footer).
    Example:

    In the screenshot above, 545a90f3 is the node ID.
      
  2. Then, navigate to Confluence administration > Logging and Profiling:

    • in the Add New Entry > Class/Package Name field, enter com.atlassian.confluence.impl.util.sandbox

    • set the New Level drop-down to DEBUG, and click Add entry
    • scroll to the bottom of the Logging and Profiling page, and click Save
        
  3. Open another tab on the same browser, navigate to Confluence, ensure that the node ID in the footer of the Confluence web interface is the same as the one observed in step 1, and then replicate the steps that result in document conversion/preview generation failure.
    For situations relating to file previews (such as previewing Microsoft Office files or specific PDFs), attaching the file(s) to a new Confluence page is recommended for accurate debugging and easy root-cause isolation.
       

  4. With debug logging enabled, verbose messages will appear in the atlassian-confluence.log conveying more information about the cause of failure.
    Here is an example where the sandbox process ran out of memory:

    2020-12-07 15:12:46,961 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$static$0 worker0: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
  5. To revert logging levels, navigate to Confluence administration > Logging and Profiling:
    • click Remove next to the entry for com.atlassian.confluence.impl.util.sandbox
    • scroll to the bottom of the Logging and Profiling page, and click Save
           
  6. Generate a new un-truncated support zip from the Confluence node involved in the failed conversion operation (identified by its node ID in step 1).
      
  7. Contact Atlassian Support, share the support zip along with details such as the Confluence page title, the document name/type involved in the document conversion operation, and the approximate timeframe when the attempt failed.


DescriptionSteps to enable debug logging to investigate sandbox failures
ProductConfluence



Last modified on Aug 4, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.