PDF export hangs in Confluence when external image URL destination is not accessible

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

Note that this KB was created for the Data Center version of the product. Data Center KBs 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

Summary

When exporting a page to PDF, the export process may hang up to 16 minutes before completing the export.

Environment

Confluence 7.13.2, 7.13.5

Diagnosis

It's possible to replicate the problem by following the steps below:

  1. Create a page in Confluence

  2. Add image URL links to the page, and ensure the URLs are not reachable from Confluence

  3. From the ellipsis menu, choose "Export to PDF"

Cause

This occurs because of a stuck thread in the export process that hangs due to an inaccessible image link. If multiple exports are triggered at the same time, it can lead to significant performance degradation. This problem was filled as a bug in Confluence and can be followed at CONFSERVER-60591 - PDF export hangs in Confluence when external image URL destination connection hangs.

The following error will appear in the atlassian-confluence.log file:

1 ERROR [http-nio-8090-exec-1] [extra.flyingpdf.impl.ConfluenceExportUserAgent] log Can't get image resource for urihttps://<confluence_hostname>/download/attachments/123456789/image_title.png?&api=v2, error: Unknown image format

Solution

Remove the bad image link URLs and retry the PDF export

Updated on February 27, 2025

Still need help?

The Atlassian Community is here for you.