You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Shehzaad Nakhoda <sh...@cs.stanford.edu> on 2006/02/24 09:18:37 UTC
[FileUpload] "Read timed out" exception
Hello,
I'm using the commons-fileupload libary (version 1.0)
to handle large file uploads into my struts web
application.
I'm using tomcat (version 5.0.30) as the web server.
(i.e. there's no Apache httpd).
I have a Struts Action that calls the parseRequest
method on a DiskFileUpload object.
The parseRequest intermittently (not predictably)
throws the following exception:
org.apache.commons.fileupload.FileUploadException:
Processing of multipart/form-data request failed. Read
timed out
at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
[... more stack trace lines snipped ...]
Here's the Java code up to the call to parseRequest:
--BEGIN CODE--
DiskFileUpload fu = new DiskFileUpload();
// maximum size before a FileUploadException
will be thrown
fu.setSizeMax(1000000000);
// maximum size that will be stored in memory
fu.setSizeThreshold(4096);
// the location for saving data that is larger
than getSizeThreshold()
fu.setRepositoryPath(rootDirectory);
List fileItems = fu.parseRequest(request);
--END CODE---
I did search on Usenet and on the Web for people
having similar problems, but didn't find a
satisfactory answer. There's a suggestion to play with
the disableUploadTimeout parameter in tomcat's
server.xml but that didn't help.
I apologize if this is a tomcat issue (i.e. off-topic
for this list), but I'm hoping someone can help me
with the tomcat-fileupload combination.
Thanks.
Shehzaad
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org