tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Long timeout after aborted upload
Date Thu, 26 Apr 2012 20:22:19 GMT
Hash: SHA1


I have Tomcat 7.0.27 fronted with Apache httpd 2.2 using mod_jk
1.2.35. We have a new feature to upload images into our webapp. It
uses Struts 1.3's multipart form parser to actually get the bits from
the request.

It's got a feature where you can get a request attribute set for you
if the upload exceeds a certain size. When we see that, we abort right
away, sending the user to an error page via a forward (Struts does
this for us) which should return a 200 OK response.

In the browser (Firefox 11.0 and 12.0 in our case), we can see the
throbber work for a good 10-20 seconds *after* the upload has failed
- -- our code has stopped running -- apparently waiting for something.

I've done thread dumps during idle times and during this long period
of waiting and they are /identical/ -- even the md5sums are the same.
That suggests to me that Tomcat and our webapp have completely washed
their hands of the request.

The only possibility I can see here is that Apache httpd hasn't closed
the connection. I'm going to be adding an access log that shows the
response time just to be sure, but can anyone think of anything that
might be causing this delay?

On a hunch that it was a keep-alive sitting there hung, I explicitly
set a "Connection:close" header in the response just to test. That
appears to have done nothing.

- From the investigations so far, it seems that the "problem" really
could just be the upload time: I tried to scp the file to the server
and it took about 20 seconds (which seems insane to me for an 11MiB
upload, but that's an issue between me and my ISP) so maybe just
pushing the bits is the issue.

Since Tomcat appears to be idle pretty much right away, the issue has
to be either mod_jk or httpd, or the browser itself. Is there anything
I can do at the web server level to sever the connection ASAP? Or is
this just a stubborn browser that refuses to give up until the last
byte has been sent?

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


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

View raw message