commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryl Stultz" <>
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

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

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.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message