commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24306] - Fileupload fails for forms with a large number of inputs
Date Fri, 15 Oct 2004 20:45:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=24306>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=24306

Fileupload fails for forms with a large number of inputs





------- Additional Comments From headius@headius.com  2004-10-15 20:45 -------
Added a patch based on FileUpload 1.0 (FILEUPLOAD_1_0 tag) that uses 1024 for
non-file form fields.

Incidentally, isn't it a bit of a misnomer to call this value a "threshhold"?
ByteArrayOutputStream will grow the array if necessary to accommodate incoming
data. The problem here was that, for performance reasons, FileUpload asked the
VM to always allocate a large amount of memory, regardless of what would
actually be needed. When there were many form fields (as in our case, where we
have SELECTs sending hundreds of values) the request became unprocessable. Each
of the thousand fields tried to allocate several hundred K of memory.

We are using the attached patch for our production system now.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message