Affects Version/s: 5.8.18, 5.10.4, 5.9.13
Fix Version/s: 6.0.3
Component/s: Content - Attachments
Support reference count:24
QA Demo Status:Done
The file conversion service in Confluence could cause OutOfMemoryError due to a bug incurring a sustained CPU spike in
which was subsequently fixed in Confluence 5.10.4 CONF-38233
The file conversion service leverages the API provided by Aspose.Pdf for Java. The Aspose library might consume many memory for PDFs having either lots of objects or many contents, especially for large PDF files, say >100Mb. If the memory required is not able to be fulfilled, the OutOfMemory will occur, as a result of that, the system will be very slow to response to user's requests, and the system could be restarted to recover from this situation.
The issue can be reproduced with the following steps,
- Startup a Confluence instance with the memory setting: -Xms256m -Xmx1g.
- Create some test pages, then attach some PDF attachments with size more than 100Mb. Note you need to adjust the "Attachment Maximum Size" via the General Configuration.
- Click the thumbnails to view the attached PDFs
- Continue the #2 and #3 until the OOM comes up
At this stage, the primary workaround for this issue is to upgrade to Confluence 5.10.4 as the bug causing the CPU to spike and subsequently OOME was fixed as part of -
Other, workarounds if you are already running on Confluence 5.10.4 are as the following:
- Increase more memory to Confluence instance if possible, as the issue is caused by the short of heap memory
- Reduce the memory spike consumed by restricting the maximum size of attachment allowed