Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
16.0.0
-
Unknown
-
N/A
-
N/A
-
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
- is related to
-
XWIKI-16508 Can't Save or open in Source mode a large document
-
- Closed
-
I'm closing as won't fix for now since the issue is a config one. What could be discussed is the default size of https://www.xwiki.org/xwiki/bin/view/FAQ/How%20to%20solve%20the%20%22Unable%20to%20parse%20form%20content%22%20error%20in%20Jetty
However as mentioned there having a too-high value can be a risk:
5120Mb is 640MB, right? That's quite high and I feel it's ok to not support this without a config option. WDYT?