tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: Problems uploading huge files >2GB to Tomcat app.
Date Tue, 10 Apr 2012 17:46:31 GMT
2012/4/10 Nick Porter <>:
> [NP] Yes. I can fathom no pattern to them. In fact, the only way I can actually see them
is to packet trace the HTTP exchange.

You do not have AccessLogValve configured?!

I did the following to test how the standard Manager application
handles it.  In 6.0.x and then in current 7.0.x.

1. Configured AccessLogValve in server.xml as following, to print
content-length headers of request and response:

 <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
   prefix="localhost_access_log." suffix=".txt"
   pattern='%h %l %u %t "%r" %s %b in:[%{content-length}i]

2. Prepared a two files by concatenating several copies of a zip
archive and renaming it to *.war.

"test.war" is 127,586,991 bytes
"test1.war" is 2,314,844,070 bytes

3. Started Tomcat, logged in into manager and tried to upload the
files as new web applications.

I am using Firefox 11.0, IE 8.0 both on Windows XP.

The results:
1). Uploading test.war (127Mb) in Firefox 11
Tomcat 6.0: OK
The first zip in concatenated file was unzipped as a new webapp.

Tomcat 7.0 Error 500, message
the request was rejected because its size (127587196) exceeds the
configured maximum (52428800)

This behaviour of Tomcat 7 is expected, because of setting in its web.xml:
      <!-- 50MB max -->

Access log:
Tomcat 6 - tomcat [10/Apr/2012:21:20:27 +0400] "POST
HTTP/1.1" 200 16044 in:[127587194] out:[-]

Tomcat 7 - username [10/Apr/2012:21:17:57 +0400] "POST
HTTP/1.1" 500 2972 in:[127587196] out:[2972]

So everything is OK.

2). Uploading test1.war (>2Gb):

Both Tomcat 6 and Tomcat 7 close request immediately, responding with
status 400.

Looking into access log I see wrong value of content-length header
from the request.
The value is different between Firefox and IE, but both are wrong,
being negative.
(Apparently the browsers have different coding for
"multipart/form-data", with different overhead).  The values are the
same for Tomcat 6 and 7.

This is from Tomcat 7 access log:

[[[ - - [10/Apr/2012:21:08:31 +0400] "POST
HTTP/1.1" 400 - in:[-1980123022] out:[-] - - [10/Apr/2012:21:09:24 +0400] "POST
HTTP/1.1" 400 - in:[-198012301] out:[-]

The first negative value is from Firefox. The second one is from IE.

I'll try to debug it later.

Best regards,
Konstantin Kolinko

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

View raw message