tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Long timeout after aborted upload
Date Thu, 26 Apr 2012 20:22:19 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

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?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+ZrnsACgkQ9CaO5/Lv0PDCfQCgwE0tZRVYg0LQPKcA+QmEv1cX
MXcAn0qt5bSa4OKb74omJ6UJA8lwak1f
=qIxu
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message