commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryl Stultz" <da...@6degrees.com>
Subject FileUpload - file too large - how to abort
Date Tue, 09 Sep 2003 19:56:50 GMT
Hello, I've got an Apache 1.3 / Tomcat 4.0 application running on RedHat
7.2.

I'm using FileUpload and having a problem with uploads that exceed the
file size limit. For example,

File size limit is 1 MB, I upload the following:
0.8MB upload takes 20 seconds and works fine
1.1MB upload takes 35 seconds and triggers the size exceeded exception -
my app traps it and issues a response warning
2.7MB upload takes 15 seconds (shorter!) and fails to return any response
- my browser (IE) says "can't find server"
3.7MB upload takes 30 seconds and fails like previous

File size limit increased to 5MB:
2.7 MB upload takes 50 seconds and works fine
5.4 MB upload takes 40 seconds and fails with no response to browser

My Apache Timeout is 300 seconds, I've disabledUploadTimeout in my Tomcat
connector and the connector has no connectionTimeout so defaults to 60
seconds.

Is there a problem with my server config or am I using FileUpload
improperly? I found this block from the archives:

>One of the first things FileUpload does is check the Content-Length HTTP
>header against a configured threshold. If it's too big, the handler won't
>go any further, but will throw a FileUploadException instead. Struts
>catches that and also aborts processing the request at that point.

I'm not using Struts, but the above says Struts aborts the processing of
the request. Is that something I need to do with my app? How do I do this?
Is there a way to stop the upload from continuing since we already know
it's too much? I tried getting the input stream from the request and
closing it, but it didn't seem to have any effect.

BTW, my production server is on the "Internet". My development server is
on the local network and does not exhibit this problem. The servers are
"largely identical".

Thanks for the help.

Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com


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


Mime
View raw message