Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21923

Out of memory exception when trying to upload a large attachment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 16.0.0
    • Storage - File System
    • None
    • Unknown

    Description

      Environment: XWiki 16.0.0 Jetty HSQLDB on Fedora 39

      When trying to upload a large file to any page an error occurs

      and the following logs appear:

      2024-02-23 15:55:07.258:WARN :oejs.Request:qtp798244209-72 - http://localhost:8080/xwiki/bin/upload/Main/WebHome: java.lang.IllegalStateException: java.lang.OutOfMemoryError: Required array length 2147483639 + 15246 is too large
      2024-02-23 15:55:07.261:WARN :oejs.HttpChannel:qtp798244209-72: handleException /xwiki/bin/upload/Main/WebHome org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form content

      I tested with both the default -xmx settings (1024mb) but also an exaggerated value (6gb).

      The test file was generated using this website: https://testfiledownload.com/test-file-generator and it had the size of 5gb.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tcaras Teodor Caras
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: