Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load very large images #20446

Closed
wezell opened this issue May 25, 2021 · 8 comments · Fixed by #20580
Closed

Unable to load very large images #20446

wezell opened this issue May 25, 2021 · 8 comments · Fixed by #20580

Comments

@wezell
Copy link
Contributor

wezell commented May 25, 2021

Loading very large images, e.g. images that are 30000x20000 pixels and 200mb on disk will cause dotCMS to churn and you will ultimately end up with an OOM exception

wezell added a commit that referenced this issue May 28, 2021
wezell added a commit that referenced this issue Jun 3, 2021
wezell added a commit that referenced this issue Jun 10, 2021
@wezell wezell added this to the Maintenance Sprint milestone Jun 23, 2021
@dsilvam dsilvam linked a pull request Jun 24, 2021 that will close this issue
dsilvam added a commit that referenced this issue Jun 28, 2021
dsilvam added a commit that referenced this issue Jun 30, 2021
@dsilvam dsilvam self-assigned this Jun 30, 2021
dsilvam added a commit that referenced this issue Jul 1, 2021
dsilvam added a commit that referenced this issue Jul 1, 2021
* #20446 using subsample to speed up resizing

* #20446 writing tests

* #20446 handle very large images

* #20446 re-adding support for subsampling

* #20446 resample to 5000, then resize fast

* #20446 Add IT to suite

* #20446 Remove commented out code and unneeded line

* #20446 fix javadoc

* #20446 Code-review

Co-authored-by: Will Ezell <will@dotcms.com>
@dsilvam dsilvam reopened this Jul 1, 2021
@dsilvam dsilvam removed their assignment Jul 2, 2021
@victoralfaro-dotcms
Copy link
Contributor

victoralfaro-dotcms commented Jul 7, 2021

Using the birth of Venus image (224.6 MB).
Added a content for that file, zoom in and out at Edit Image modal, published and add a page that contains the image.
No OOM Error seen on the log.

Screen Shot 2021-07-07 at 08 28 49

Screen Shot 2021-07-07 at 08 34 46

Screen Shot 2021-07-07 at 08 35 36

Screen Shot 2021-07-07 at 08 36 13

Screen Shot 2021-07-07 at 08 36 39

Screen Shot 2021-07-07 at 08 38 22

Screen Shot 2021-07-07 at 08 39 05

@victoralfaro-dotcms
Copy link
Contributor

victoralfaro-dotcms commented Jul 7, 2021

BTW all the backend actions were done using Safari since with Chrome it just won't load the image for edition and when it's opened in separate browser tab.

Screen Shot 2021-07-07 at 08 52 27
Screen Shot 2021-07-07 at 08 52 13

Got a bunch of these:

08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: 1edfec6e-0292-43d6-bed4-1362bd1d0066, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b
08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: b579a635-a8b3-4bff-87a3-8daaa3db89f4, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b
08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: e2b5536c-9569-4e09-b355-6620468ea346, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b
08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: f04e1783-98ac-478d-8cb8-98798382d344, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b
08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: c67c7a8f-81c5-4488-b3cb-44e4cc37b0fd, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b
08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: 87c61929-aed4-4f1b-a960-fb46dbad2134, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b
08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: 75a974e7-b195-4535-9bd7-21b2bde17156, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b
08:58:27.463  INFO  delegate.SystemEventsJobDelegate - The event: 3bd3996e-8c21-491b-bf1b-4a11d6982b0b, has been skipped on the server: 57937e0e-81ff-49c9-a52b-9d9a2b61917b

@bryanboza
Copy link
Member

Fixed, tested on Safari and works fine, seems chrome have problems rendering those kind of images, but this is external to dotCMS. Tested on release-21.07 // Postgres // Safari

@bryanboza
Copy link
Member

New card related to the edit image editor here #20639

@wezell wezell closed this as completed Jul 14, 2021
@jcastro-dotcms jcastro-dotcms added the LTS: Excluded Ticket that has been excluded from at least one LTS label Aug 3, 2021
@jcastro-dotcms
Copy link
Contributor

The fix touches too many files. The risk of putting this in the LTS is too high.

@wezell wezell removed the LTS: Excluded Ticket that has been excluded from at least one LTS label Sep 7, 2021
@wezell
Copy link
Contributor Author

wezell commented Sep 7, 2021

@jcastro-dotcms @swicken-dotcms this needs to be backported into the next planned release of 21.06 LTS - this causes many issues with customers who rely on the image processing - not just with large images but also where multiple servers are reading and writing the same files.

@wezell wezell added the LTS: Discuss To be discussed between Support & R&D label Sep 7, 2021
@swicken-dotcms swicken-dotcms added the LTS : Next Ticket that will be added to LTS label Sep 7, 2021
@jcastro-dotcms jcastro-dotcms removed the LTS: Discuss To be discussed between Support & R&D label Sep 20, 2021
@jcastro-dotcms
Copy link
Contributor

Note for 5.3.8.7 testing:

Because of the size of the image, it can take more than a minute for the thumbnail to be generated. Also, clicking the INFO button in the Image content and clicking the File Link can take a few seconds to load. These situations are expected, and no error is thrown in the log anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants