Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-3318

BinariesServlet should not create an in-memory copy of large binaries

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • High
    • Resolution: Cannot Reproduce
    • None
    • 2.30.01, CMS-10.0-GA
    • None

    Description

      The BinariesServlet creates an in memory copy of all binaries. For binaries smaller than the max cache size that is fine. For larger binaries it is not ok. Creating many concurrent requests to a large binary can lead to an OOME.

      Large binaries should be directly streamed from jcr which will create a local file copy and not keep the connection to the database open (configurable).

      The key components are:

      • set/check maxSize in binariesservlet from HstCache.getMaxSize() (binariesCache)
      • check getLength() of the binary property (jcr:data). The length is stored separately in the db and it is a cheap call
      • if it is larger than maxSize, stream directly and do not call BinaryPage.loadDataFromStream() which creates a local in memory copy

      Attachments

        Activity

          People

            Unassigned Unassigned
            bvdschans Bart van der Schans (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: