-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.4.11, 7.12.0
-
None
-
4
-
Severity 2 - Major
-
1
-
Summary
When attaching PDF files to Confluence Server and converting them to preview, it causes a CPU and memory usage spike on Confluence process which throws an OOM when the maximum memory is reached.
The PDF attached to this case as an example contains several images of high definition, but the file is only 16MB in size.
1980.9.24 Spectator - Stern takes over budgeting group.pdf
The instance can stall and crash given the OOM. The following error appears in atlassian-confluence.log file:
ERROR [conversion-thread-pdf-thumb-0] [plugins.conversion.impl.TimeoutConversionRunnable] run Cannot convert. Execution error:
-- referer: http://rodrigo.com:8411/pages/editpage.action?pageId=65610 | url: /rest/tinymce/1/macro/placeholder | traceId: a124ced5d925262d | userName: admin
java.lang.OutOfMemoryError: Java heap space
On Confluence datacenter, it uses the external conversion pool to perform this process. The CPU and memory still increase, however, the problem is mitigated by using the external pool, and Confluence continues working as normal.
There were old bug reports opened with the same behavior before. EG:
- https://jira.atlassian.com/browse/CONFSERVER-38233
- https://jira.atlassian.com/browse/CONFSERVER-43363
How to replicate
1) Install Confluence version 7.4.11 server or datacenter. This was tested with 7.12 DC too.
2) Attach the file from this bug report to a page and save it.
3) Open the system monitor and start monitoring the Confluence services.
4) Open the PDF file preview and check the system monitor for the CPU and memory increased usage.
Mitigation/workaround
Disable the file conversion service for PDF as stated on this KB article:
The file can still be uploaded and downloaded from Confluence, but it will not be converted on the pages.