[MGNLUI-5284] DefaultImageProvider / JcrPreviewProvider don't release streams properly Created: 15/Jul/19  Updated: 16/Jul/19  Resolved: 16/Jul/19

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.7, 6.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Zdenek Skodik Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Especially environments serving a lot of content and/or performing bulk operations on them, e.g. previewing a zip-uploaded images, are facing severe memory demands, eventually killing the webapp.

To reproduce:

  1. upload a ~150MB zip file at https://demoauthor.magnolia-cms.com/.magnolia/admincentral#app:assets
  2. switch to thumbnail view
  3. demo should be down now or then


 Comments   
Comment by Aleksandr Pchelintcev [ 16/Jul/19 ]

zdenekskodik if you're referring to the input stream created in DefaultImageProvider#resolveImageResource, then as far as I am concerned - that is not an issue.

It is a part of setting up Vaadin's StreamSource (part of StreamResource) and those tend to get cleaned up and closed by framework once served to the client-side.

see com.vaadin.server.AbstractClientConnector#handleConnectorRequest and subsequent com.vaadin.server.DownloadStream#writeResponse.

While it might seem that there's smth wrong with those providers - so far it just appears that they merely trigger another variation generation, which for high-res images might inflict huge amount of RAM for the BufferedImage-related operations (those originate in imaging module).

Closing the ticket as not an issue, feel free to re-open in case I got the matter wrong and there is actually a leak that we did not close.

Generated at Mon Feb 12 09:25:00 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.